Skip to content

Commit 767712f

Browse files
rohitner-googlemartinkpetersen
authored andcommitted
scsi: ufs: core: Fix MCQ MAC configuration
As per JEDEC Standard No. 223E Section 5.9.2, the max # active commands value programmed by the host sw in MCQConfig.MAC should be one less than the actual value. Signed-off-by: Rohit Ner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Wang <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 517bcc2 commit 767712f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ufs/core/ufs-mcq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void ufshcd_mcq_config_mac(struct ufs_hba *hba, u32 max_active_cmds)
9494

9595
val = ufshcd_readl(hba, REG_UFS_MCQ_CFG);
9696
val &= ~MCQ_CFG_MAC_MASK;
97-
val |= FIELD_PREP(MCQ_CFG_MAC_MASK, max_active_cmds);
97+
val |= FIELD_PREP(MCQ_CFG_MAC_MASK, max_active_cmds - 1);
9898
ufshcd_writel(hba, val, REG_UFS_MCQ_CFG);
9999
}
100100
EXPORT_SYMBOL_GPL(ufshcd_mcq_config_mac);

0 commit comments

Comments
 (0)