On 20/09/2023 00:29, Bart Van Assche wrote:
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index dc1285351336..5fccec3c1091 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -2822,7 +2822,8 @@ static int ufshcd_queuecommand(struct Scsi_Host
*host, struct scsi_cmnd *cmd)
int err = 0;
struct ufs_hw_queue *hwq = NULL;
- WARN_ONCE(tag < 0 || tag >= hba->nutrs, "Invalid tag %d\n",
tag);
How is tag < 0 even possible? Indeed, I doubt the tag >= hba->nutrs
check also, since shost->can_queue is set to hba->nutrs -
UFSHCD_NUM_RESERVED AFAICS
John
+ if (WARN_ONCE(tag < 0 || tag >= hba->nutrs, "Invalid tag
%d\n", tag))
+ return 0;
As far as I know, a return 0 from a queuecommand means that the request
was accepted by LLD.