aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2021-05-19 13:20:57 -0700
committerMartin K. Petersen <[email protected]>2021-05-31 22:48:20 -0400
commit40d2fd05ecc2b63d1bd8f6686f09941afe85edfe (patch)
tree54afa469524b8f2f999d98d0971a69c2447615f3
parenta0815c45c89f544861eae55d85ccee6b1b1451e8 (diff)
scsi: ufs: Suppress false positive unhandled interrupt messages
From ufshcd_transfer_req_compl(): Resetting interrupt aggregation counters first and reading the DOOR_BELL afterward allows us to handle all the completed requests. In order to prevent other interrupts starvation the DB is read once after reset. The down side of this solution is the possibility of false interrupt if device completes another request after resetting aggregation and before reading the DB. Prevent that ufshcd_intr() reports a false positive "Unhandled interrupt" message if the above scenario is triggered. Link: https://lore.kernel.org/r/[email protected] Cc: Stanley Chu <[email protected]> Cc: Can Guo <[email protected]> Cc: Bean Huo <[email protected]> Cc: Jaegeuk Kim <[email protected]> Cc: Asutosh Das <[email protected]> Suggested-by: Jaegeuk Kim <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/ufs/ufshcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index c382260e0cf7..af527e77fe66 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6453,7 +6453,8 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba)
}
if (enabled_intr_status && retval == IRQ_NONE &&
- !ufshcd_eh_in_progress(hba)) {
+ (!(enabled_intr_status & UTP_TRANSFER_REQ_COMPL) ||
+ hba->outstanding_reqs) && !ufshcd_eh_in_progress(hba)) {
dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x (0x%08x, 0x%08x)\n",
__func__,
intr_status,