aboutsummaryrefslogtreecommitdiff
path: root/kernel/spinlock.c
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-05-26 03:49:42 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-26 03:49:42 -0400
commit32529e0128923e42126b5d14e444c18295a452ba (patch)
treed50736f63bd9692076d68c3f8748f1b6bf540a80 /kernel/spinlock.c
parentbef9c558841604116704e10b3d9ff3dbf4939423 (diff)
[PATCH] libata: Fix zero sg_dma_len() on 64-bit platform
When testing ATAPI PIO data transfer on the ppc64 platform, __atapi_pio_bytes() got zero when sg_dma_len() is used. I checked the <asm-ppc64/scatterlish.h>, the struct scatterlist is defined as: struct scatterlist { struct page *page; unsigned int offset; unsigned int length; /* For TCE support */ u32 dma_address; u32 dma_length; }; #define sg_dma_address(sg) ((sg)->dma_address) #define sg_dma_len(sg) ((sg)->dma_length) So, if the scatterlist is not DMA mapped, sg_dma_len() will return zero on ppc64. The same problem should occur on the x86-64 platform. On the i386 platform, sg_dma_len() returns sg->length, that's why the problem does not occur on an i386. Changes: - Use sg->length if the scatterlist is not DMA mapped (yet). Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Diffstat (limited to 'kernel/spinlock.c')
0 files changed, 0 insertions, 0 deletions