Skip to content

Commit

Permalink
[PATCH] libata: PIO 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed May 24, 2006
1 parent 1f3461a commit b6079ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit b6079ca

Please sign in to comment.