linux/drivers
Albert Lee 32529e0128 [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>
2005-05-26 03:49:42 -04:00
..
acorn
acpi
atm
base [PATCH] driver core: restore event order for device_add() 2005-05-23 16:08:12 -07:00
block [PATCH] packet driver permission checking fix 2005-05-20 15:48:16 -07:00
bluetooth
cdrom
char [PATCH] ipmi build fix 2005-05-25 15:31:27 -07:00
cpufreq
crypto
dio
eisa
fc4
firmware
i2c [PATCH] ppc64: Fix booting on latest G5 models 2005-05-22 17:34:42 -07:00
ide [PATCH] relax ide-cd dma restrictions 2005-05-25 10:17:08 -07:00
ieee1394 [PATCH] ieee1394: fix premature expiry of async packets 2005-05-17 07:59:24 -07:00
infiniband [PATCH] IB: fix endianness of path record MTU field 2005-05-25 15:31:28 -07:00
input
isdn
macintosh [PATCH] therm_adt746x: show correct sensor locations 2005-05-25 15:31:29 -07:00
mca
md
media [PATCH] v4l: bttv i2c oops fix 2005-05-25 15:31:27 -07:00
message
misc
mmc [PATCH] MMC: Proper MMC command classes support 2005-05-21 10:27:02 +01:00
mtd
net Automatic merge of /spare/repo/netdev-2.6 branch amd8111 2005-05-25 13:57:36 -04:00
nubus
oprofile
parisc
parport
pci [PATCH] PCI: add MODALIAS to hotplug event for pci devices 2005-05-17 14:31:12 -07:00
pcmcia [PATCH] pcmcia/ds: handle any error code 2005-05-17 07:59:21 -07:00
pnp
s390
sbus
scsi [PATCH] libata: Fix zero sg_dma_len() on 64-bit platform 2005-05-26 03:49:42 -04:00
serial When we detect that a 16550 was in fact part of a NatSemi SuperIO chip 2005-05-21 15:52:23 +01:00
sh
sn
tc
telephony
usb [PATCH] Speedtouch resync after lost signal. 2005-05-25 10:13:43 -07:00
video
w1
zorro
Kconfig
Makefile