We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef222f5 commit d0c89afCopy full SHA for d0c89af
drivers/ufs/core/ufs-mcq.c
@@ -580,7 +580,6 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba,
580
{
581
struct ufshcd_lrb *lrbp = &hba->lrb[task_tag];
582
struct utp_transfer_req_desc *utrd;
583
- u32 mask = hwq->max_entries - 1;
584
__le64 cmd_desc_base_addr;
585
bool ret = false;
586
u64 addr, match;
@@ -608,7 +607,10 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba,
608
607
ret = true;
609
goto out;
610
}
611
- sq_head_slot = (sq_head_slot + 1) & mask;
+
+ sq_head_slot++;
612
+ if (sq_head_slot == hwq->max_entries)
613
+ sq_head_slot = 0;
614
615
616
out:
0 commit comments