FROMLIST: scsi: ufs: core: Fix mcq nr_hw_queues

Since MAXQ is 0 based value, add one to obtain number of hardware queue.

Bug: 267974767
Link: https://lore.kernel.org/all/20230504154454.26654-4-powen.kao@mediatek.com/
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Change-Id: Id9facc9ff54f08e599e6f7026924c664cfeaad51
This commit is contained in:
Po-Wen Kao
2023-02-20 21:05:39 +08:00
committed by Todd Kjos
parent 090320760a
commit 6203e02485

View File

@@ -150,7 +150,8 @@ static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba)
u32 hba_maxq, rem, tot_queues;
struct Scsi_Host *host = hba->host;
hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities);
/* maxq is 0 based value */
hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities) + 1;
tot_queues = UFS_MCQ_NUM_DEV_CMD_QUEUES + read_queues + poll_queues +
rw_queues;