summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAlan Cox2006-05-22 17:52:06 +0200
committerJeff Garzik2006-05-24 07:53:00 +0200
commitb6079ca409bf88c248992e96510dd6f610f7ed89 (patch)
treee4096503f69f12838969133a995878ed81d8d716 /drivers/scsi
parent[PATCH] libata: minor fix for irq-pio merge (diff)
downloadkernel-qcow2-linux-b6079ca409bf88c248992e96510dd6f610f7ed89.tar.gz
kernel-qcow2-linux-b6079ca409bf88c248992e96510dd6f610f7ed89.tar.xz
kernel-qcow2-linux-b6079ca409bf88c248992e96510dd6f610f7ed89.zip
[PATCH] libata: PIO 0
Ensure the pio_mode is always setup. Don't do any setup on the controller b just ensure the mode reporting is valid to avoid tons of special cases in PATA driver code when mode switching on the fly. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index e891b83be10f..45b6b29bc10f 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1498,6 +1498,12 @@ static int ata_bus_probe(struct ata_port *ap)
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;
+ /* after the reset the device state is PIO 0 and the controller
+ state is undefined. Record the mode */
+
+ for (i = 0; i < ATA_MAX_DEVICES; i++)
+ ap->device[i].pio_mode = XFER_PIO_0;
+
/* read IDENTIFY page and configure devices */
for (i = 0; i < ATA_MAX_DEVICES; i++) {
dev = &ap->device[i];