scsi: ufs: add wmb after clear interrupt status
Subsystems (2)
PATCH 1/1 scsi: ufs: add wmb after clear interrupt status
From: Peter Wang <[email protected]>
Write IS(0x20) to clear interrupts should be done before read UTRLDBR(0x58) or UTRLCNR(0x64).
If optimize lead to read TRLDBR(0x58) or UTRLCNR(0x64) before Write IS(0x20), the final complete task may miss.
Signed-off-by Peter Wang <[email protected]>
--- drivers/scsi/ufs/ufshcd.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/scsi/ufs/ufshcd.c +4 -0
@@ -6492,6 +6492,10 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba) enabled_intr_status = intr_status &ufshcd_readl (hba,REG_INTERRUPT_ENABLE );ufshcd_writel (hba, intr_status,REG_INTERRUPT_STATUS ); + +/* Make sure interrupt status are clear before service */ +wmb (); +if (enabled_intr_status) retval |=ufshcd_sl_intr (hba, enabled_intr_status);
Signature · 1 line
2.18.0