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

Commit 1974e201 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

libata: skip 0xff polling for PATA controllers



In a presentation of true workmanship, pata_ali asserts IRQ
permanantly if the TF status register is read more than once when
there's no device attached to the port.

Avoid waiting polling for !0xff if it's PATA.  It's needed only for
some rare SATA devices anyway.

This problem is reported by Luca Tettamanti in bugzilla bug 9298.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Tested-By: default avatarLuca Tettamanti <kronos.it@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent f7fc0ceb
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -3373,7 +3373,12 @@ void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline)
	 * to clear 0xff after reset.  For example, HHD424020F7SV00
	 * iVDR needs >= 800ms while.  Quantum GoVault needs even more
	 * than that.
	 *
	 * Note that some PATA controllers (pata_ali) explode if
	 * status register is read more than once when there's no
	 * device attached.
	 */
	if (ap->flags & ATA_FLAG_SATA) {
		while (1) {
			u8 status = ata_chk_status(ap);

@@ -3383,6 +3388,7 @@ void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline)
			msleep(50);
		}
	}
}

/**
 *	ata_wait_ready - sleep until BSY clears, or timeout