Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Add debug log for UIC command timeout

It is difficult to debug when a UIC command timeout occurs simultaneously
with a UIC command complete interrupt. Currently, we only see the timeout
log without any debug information, making it unclear whether the UFS device
failed to respond or the host entered an incorrect state. Add a one-line
log to cover this situation.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210070837.1820710-2-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Peter Wang and committed by
Martin K. Petersen
01517654 931c105d

+4 -1
+4 -1
drivers/ufs/core/ufshcd.c
··· 5568 5568 5569 5569 guard(spinlock_irqsave)(hba->host->host_lock); 5570 5570 cmd = hba->active_uic_cmd; 5571 - if (!cmd) 5571 + if (!cmd) { 5572 + dev_err(hba->dev, 5573 + "No active UIC command. Maybe a timeout occurred?\n"); 5572 5574 return retval; 5575 + } 5573 5576 5574 5577 if (ufshcd_is_auto_hibern8_error(hba, intr_status)) 5575 5578 hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);