diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-03 15:19:13 +0100 |
---|---|---|
committer | AK <andi@firstfloor.org> | 2011-02-06 11:03:51 -0800 |
commit | e460ad502aa1e940b4069734d8d96cc4a303062e (patch) | |
tree | 3e8229985b70da45526150d1251a347f1fa35532 | |
parent | 7ca39620483ad7dbd833970bd6c7c6246edcd573 (diff) | |
download | lwn-e460ad502aa1e940b4069734d8d96cc4a303062e.tar.gz lwn-e460ad502aa1e940b4069734d8d96cc4a303062e.zip |
libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()
commit 687a993339c4f3a63654746230da3aab8bbdbffd upstream.
While separating out BMDMA irq handler from SFF, commit c3b28894
(libata-sff: separate out BMDMA irq handler) incorrectly made
__ata_sff_port_intr() consider an IRQ to be an idle one if the host
state was transitioned to HSM_ST_ERR by ata_bmdma_port_intr().
This makes BMDMA drivers ignore IRQs reporting host bus error which
leads to timeouts instead of triggering EH immediately. Fix it by
making __ata_sff_port_intr() consider the IRQ to be an idle one iff
the state is HSM_ST_IDLE. This is equivalent to adding HSM_ST_ERR to
the "break"ing case but less error-prone.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reported-by: Antonio Toma <antonio.toma@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/ata/libata-sff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index cde20ffa1116..804d8f8513f3 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -1515,11 +1515,10 @@ static unsigned int __ata_sff_port_intr(struct ata_port *ap, if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) return ata_sff_idle_irq(ap); break; - case HSM_ST: - case HSM_ST_LAST: - break; - default: + case HSM_ST_IDLE: return ata_sff_idle_irq(ap); + default: + break; } /* check main status, clearing INTRQ if needed */ |