mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
FROMGIT: scsi: ufs: core: Exclude UECxx from SFR dump list
Some devices may return invalid or zeroed data during an UIC error condition. In addition, reading these SFRs will clear them. This means the subsequent error handling will not be able to see them and therefore no error handling will be scheduled. Skip reading these SFRs in ufshcd_dump_regs(). Bug: 230521674 Change-Id: Idc62842c79f948580107f95c65a14e34630a0017 (cherry picked from commitef60031022https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 5.19/scsi-staging) Link: https://lore.kernel.org/r/1648689845-33521-1-git-send-email-kwmad.kim@samsung.com Fixes:d672475664("scsi: ufs: Use explicit access size in ufshcd_dump_regs") Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Bart Van Assche
parent
94816d9fd6
commit
3ccc4b2705
@@ -115,8 +115,13 @@ int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len,
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
|
||||
for (pos = 0; pos < len; pos += 4)
|
||||
for (pos = 0; pos < len; pos += 4) {
|
||||
if (offset == 0 &&
|
||||
pos >= REG_UIC_ERROR_CODE_PHY_ADAPTER_LAYER &&
|
||||
pos <= REG_UIC_ERROR_CODE_DME)
|
||||
continue;
|
||||
regs[pos / 4] = ufshcd_readl(hba, offset + pos);
|
||||
}
|
||||
|
||||
ufshcd_hex_dump(prefix, regs, len);
|
||||
kfree(regs);
|
||||
|
||||
Reference in New Issue
Block a user