• Tejun Heo's avatar
    libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr() · 687a9933
    Tejun Heo authored
    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: default avatarTejun Heo <tj@kernel.org>
    Reported-by: default avatarAntonio Toma <antonio.toma@gmail.com>
    Cc: stable@kernel.org
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    687a9933
libata-sff.c 83.9 KB