Skip to content

Commit

Permalink
libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()
Browse files Browse the repository at this point in the history
While separating out BMDMA irq handler from SFF, commit c3b2889
(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 <[email protected]>
Reported-by: Antonio Toma <[email protected]>
Cc: [email protected]
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
htejun authored and Jeff Garzik committed Dec 24, 2010
1 parent 90a8a73 commit 687a993
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,11 +1532,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 */
Expand Down

0 comments on commit 687a993

Please sign in to comment.