kernel-ark/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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
acpi [PATCH] DocBook: fix some descriptions 2005-05-01 08:59:26 -07:00
atm [ATM]: ENI155P error handling fix 2005-04-24 19:14:36 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cdrom [PATCH] make some things static 2005-05-05 16:36:47 -07:00
char [PATCH] ipmi build fix 2005-05-25 15:31:27 -07:00
cpufreq [PATCH] cpufreq annoying warning fix 2005-05-02 08:15:22 -07:00
crypto Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dio Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
eisa Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fc4 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
firmware Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 [PATCH] drivers/input/keyboard/atkbd.c: fix off by one errors 2005-05-17 07:59:17 -07:00
isdn [PATCH] make lots of things static 2005-05-01 08:59:29 -07:00
macintosh [PATCH] therm_adt746x: show correct sensor locations 2005-05-25 15:31:29 -07:00
mca Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
md [PATCH] md: set the unplug_fn and issue_flush_fn for md devices *after* committed to creation 2005-05-17 07:59:12 -07:00
media [PATCH] v4l: bttv i2c oops fix 2005-05-25 15:31:27 -07:00
message [PATCH] Convert i2o to compat_ioctl 2005-04-18 12:34:15 -05:00
misc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmc [PATCH] MMC: Proper MMC command classes support 2005-05-21 10:27:02 +01:00
mtd [PATCH] fix u32 vs. pm_message_t in drivers/mmc,mtd,scsi 2005-04-16 15:25:29 -07:00
net Automatic merge of /spare/repo/netdev-2.6 branch amd8111 2005-05-25 13:57:36 -04:00
nubus Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
oprofile [PATCH] oprofile trivial user annotations 2005-04-26 07:43:42 -07:00
parisc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
parport [PATCH] ISA_DMA Kconfig fixes - part 2 (parport_pc) 2005-05-04 07:33:13 -07:00
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 [PATCH] drivers/pnp/pnpacpi/rsparser.c: fix an array overflow 2005-05-01 08:59:30 -07:00
s390 [PATCH] s390: dasd set online failure 2005-05-17 07:59:17 -07:00
sbus [SPARC]: Eliminate local MIN/MAX macros in drivers/sbus/char/aurora.c 2005-05-15 16:01:50 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sn Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
telephony [PATCH] ixj* - compile warning cleanup 2005-05-05 16:36:48 -07:00
usb [PATCH] Speedtouch resync after lost signal. 2005-05-25 10:13:43 -07:00
video [PATCH] make some things static 2005-05-05 16:36:47 -07:00
w1 [PATCH] w1_smem: w1 ID is only 8 bytes long. 2005-04-18 21:16:57 -07:00
zorro Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00