summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_parport
diff options
context:
space:
mode:
authorSzuying Chen <chensiying21@gmail.com>2023-09-07 11:17:10 +0300
committerDamien Le Moal <dlemoal@kernel.org>2023-09-15 05:34:31 +0300
commit737dd811a3dbfd7edd4ad2ba5152e93d99074f83 (patch)
tree8637451cd750e83a94e3ecd75a6aa6b230ae4529 /drivers/ata/pata_parport
parente97eb65dd464e7f118a16a26337322d07eb653e2 (diff)
downloadlinux-737dd811a3dbfd7edd4ad2ba5152e93d99074f83.tar.xz
ata: libahci: clear pending interrupt status
When a CRC error occurs, the HBA asserts an interrupt to indicate an interface fatal error (PxIS.IFS). The ISR clears PxIE and PxIS, then does error recovery. If the adapter receives another SDB FIS with an error (PxIS.TFES) from the device before the start of the EH recovery process, the interrupt signaling the new SDB cannot be serviced as PxIE was cleared already. This in turn results in the HBA inability to issue any command during the error recovery process after setting PxCMD.ST to 1 because PxIS.TFES is still set. According to AHCI 1.3.1 specifications section 6.2.2, fatal errors notified by setting PxIS.HBFS, PxIS.HBDS, PxIS.IFS or PxIS.TFES will cause the HBA to enter the ERR:Fatal state. In this state, the HBA shall not issue any new commands. To avoid this situation, introduce the function ahci_port_clear_pending_irq() to clear pending interrupts before executing a COMRESET. This follows the AHCI 1.3.1 - section 6.2.2.2 specification. Signed-off-by: Szuying Chen <Chloe_Chen@asmedia.com.tw> Fixes: e0bfd149973d ("[PATCH] ahci: stop engine during hard reset") Cc: stable@vger.kernel.org Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers/ata/pata_parport')
0 files changed, 0 insertions, 0 deletions