Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1974e20161a2c097c481d2ff711de7db56cb2cd6 Commit: 1974e20161a2c097c481d2ff711de7db56cb2cd6 Parent: f7fc0ceb4d72ea5c40d50053b68ebecfbd0cc38c Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Thu Nov 8 11:20:18 2007 +0900 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Thu Nov 8 13:08:41 2007 -0500
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: Tejun Heo <[EMAIL PROTECTED]> Tested-By: Luca Tettamanti <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 89fd0e9..fd33261 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3373,14 +3373,20 @@ 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. */ - while (1) { - u8 status = ata_chk_status(ap); + if (ap->flags & ATA_FLAG_SATA) { + while (1) { + u8 status = ata_chk_status(ap); - if (status != 0xff || time_after(jiffies, deadline)) - return; + if (status != 0xff || time_after(jiffies, deadline)) + return; - msleep(50); + msleep(50); + } } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html