Skip to contentSkip to conversation

libata fixes

PATCH New Jeff Garzik 1 participant 1 message Oct 11, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata fixes

Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 drivers/ata/libata-core.c  |    6 +++++-
 drivers/ata/libata-scsi.c  |   46 +++++++++++++++++++++++++++++++++++++-------
 drivers/ata/pata_qdi.c     |    2 +-
 drivers/ata/sata_promise.c |    1 +
 4 files changed, 46 insertions(+), 9 deletions(-)

Alan Cox:
libata: Don't believe bogus claims in the older PIO mode register

Eran Tromer:
libata: return sense data in HDIO_DRIVE_CMD ioctl

Jeff Garzik:
[libata] sata_promise: add PCI ID

Peter Korsgaard:
pata-qdi: fix le32 in data_xfer

drivers/ata/libata-core.c +5 -1
index 77138a3..83728a9 100644
@@ -870,7 +870,11 @@ static unsigned int ata_id_xfermask(cons
 		 * the PIO timing number for the maximum. Turn it into
 		 * a mask.
 		 */
-		pio_mask = (2 << (id[ATA_ID_OLD_PIO_MODES] & 0xFF)) - 1 ;
+		u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF;
+		if (mode < 5)	/* Valid PIO range */
+                	pio_mask = (2 << mode) - 1;
+		else
+			pio_mask = 1;
 
 		/* But wait.. there's more. Design your standards by
 		 * committee and you too can get a free iordy field to
drivers/ata/libata-scsi.c +39 -7

80 lines not on this page · raw message

drivers/ata/pata_qdi.c +1 -1
index 7977f47..2c3cc0c 100644
@@ -141,7 +141,7 @@ static void qdi_data_xfer(struct ata_dev
 				memcpy(&pad, buf + buflen - slop, slop);
 				outl(le32_to_cpu(pad), ap->ioaddr.data_addr);
 			} else {
-				pad = cpu_to_le16(inl(ap->ioaddr.data_addr));
+				pad = cpu_to_le32(inl(ap->ioaddr.data_addr));
 				memcpy(buf + buflen - slop, &pad, slop);
 			}
 		}
drivers/ata/sata_promise.c +1 -0
index 8bcdfa6..72eda51 100644
@@ -260,6 +260,7 @@ static const struct pci_device_id pdc_at
 #if 0
 	{ PCI_VDEVICE(PROMISE, 0x3570), board_20771 },
 #endif
+	{ PCI_VDEVICE(PROMISE, 0x3577), board_20771 },
 
 	{ }	/* terminate list */
 };