Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6079ca4 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik
Browse files

[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: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 1f3461a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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];