Messages in this thread | | | Date | Mon, 11 Sep 2023 15:22:04 +0900 | Subject | Re: [PATCH v4] ahci: libahci: clear pending interrupt status | From | Damien Le Moal <> |
| |
On 9/7/23 17:17, Szuying Chen wrote: > When a CRC error occurs, the HBA asserts an interrupt to indicate an > interface fatal error(PxIS.IFS). The ISR clear PxIE and PxIS, then do > error recovery. Before recovery process, HBA receives another SDB FIS > with the error(PxIS.TFES) from device. This can't be serviced due to > PxIE be cleared already. During error recovery process, the HBA can't > issue any new command after setting PxCMD.ST to 1 due to PxIS.TFES > still alive. > > According to AHCI 1.3.1 - section 6.2.2 specification. Fatal errors > (signified by the setting of 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, 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>
Applied to for-6.6-fixes with some tweaks to the commit message. Thanks !
-- Damien Le Moal Western Digital Research
| |