Skip to content

Commit 72a81bb

Browse files
powen-kao-mtkmartinkpetersen
authored andcommitted
scsi: ufs: core: Fix MCQ nr_hw_queues
Since MAXQ is 0-based value, add one to obtain number of hardware queues. Signed-off-by: Po-Wen Kao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 06caeb5 commit 72a81bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ufs/core/ufs-mcq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba)
150150
u32 hba_maxq, rem, tot_queues;
151151
struct Scsi_Host *host = hba->host;
152152

153-
hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities);
153+
/* maxq is 0 based value */
154+
hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities) + 1;
154155

155156
tot_queues = UFS_MCQ_NUM_DEV_CMD_QUEUES + read_queues + poll_queues +
156157
rw_queues;

0 commit comments

Comments
 (0)