]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: ufs: core: Remove WARN_ON_ONCE() call from ufshcd_uic_cmd_compl()
authorBart Van Assche <bvanassche@acm.org>
Fri, 15 Aug 2025 15:58:24 +0000 (08:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Aug 2025 02:15:18 +0000 (22:15 -0400)
The UIC completion interrupt may be disabled while an UIC command is
being processed. When the UIC completion interrupt is reenabled, an UIC
interrupt is triggered and the WARN_ON_ONCE(!cmd) statement is hit.
Hence this patch that removes this kernel warning.

Fixes: fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze")
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20250815155842.472867-3-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index b047325a3669a26216b6732c5c116b2fbf387b6c..2097efe3a990941ced25726124ac3a84438319ea 100644 (file)
@@ -5561,7 +5561,7 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)
 
        guard(spinlock_irqsave)(hba->host->host_lock);
        cmd = hba->active_uic_cmd;
-       if (WARN_ON_ONCE(!cmd))
+       if (!cmd)
                goto unlock;
 
        if (ufshcd_is_auto_hibern8_error(hba, intr_status))