Skip to content

Commit b84ca6e

Browse files
Subhash Jadavanimartinkpetersen
authored andcommitted
scsi: ufs-qcom: fix bug with read/modify write of UFS_CFG1
ufs_qcom_print_hw_debug_reg_all() function is having a bug where it might incorrectly modify undesired bits in UFS_CFG1 register, this change fixes it. Reviewed-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 56d4a18 commit b84ca6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/ufs/ufs-qcom.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,8 @@ static void ufs_qcom_print_hw_debug_reg_all(struct ufs_hba *hba,
14701470
reg = ufs_qcom_get_debug_reg_offset(host, UFS_UFS_DBG_RD_PRDT_RAM);
14711471
print_fn(hba, reg, 64, "UFS_UFS_DBG_RD_PRDT_RAM ", priv);
14721472

1473-
ufshcd_writel(hba, (reg & ~UFS_BIT(17)), REG_UFS_CFG1);
1473+
/* clear bit 17 - UTP_DBG_RAMS_EN */
1474+
ufshcd_rmwl(hba, UFS_BIT(17), 0, REG_UFS_CFG1);
14741475

14751476
reg = ufs_qcom_get_debug_reg_offset(host, UFS_DBG_RD_REG_UAWM);
14761477
print_fn(hba, reg, 4, "UFS_DBG_RD_REG_UAWM ", priv);

0 commit comments

Comments
 (0)