Skip to contentSkip to conversation

ufs: core: change hwq_id type and value

PATCH Applied [email protected] 2 participants 2 messages May 9, 2025 – May 13, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ufs: core: change hwq_id type and value

From: Peter Wang <[email protected]>

Change the type of hwq_id to u32 because the member id of struct ufs_hw_queue is u32 (hwq->id) and the trace entry hwq_id is also u32. Set hwq_id to 0 if mcq is not supported, as SDB mode only supports one hardware queue.

---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +1 -1
index 7735421e3991..14e4cfbcb9eb 100644
@@ -432,7 +432,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
 	u8 opcode = 0, group_id = 0;
 	u32 doorbell = 0;
 	u32 intr;
-	int hwq_id = -1;
+	u32 hwq_id = 0;
 	struct ufshcd_lrb *lrbp = &hba->lrb[tag];
 	struct scsi_cmnd *cmd = lrbp->cmd;
 	struct request *rq = scsi_cmd_to_rq(cmd);
Signature · 1 line
2.45.2
#1 lore raw
Quoted 5 lines

Change the type of hwq_id to u32 because the member id of struct ufs_hw_queue is u32 (hwq->id) and the trace entry hwq_id is also u32. Set hwq_id to 0 if mcq is not supported, as SDB mode only supports one hardware queue.

Applied to 6.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen