Skip to content

Commit

Permalink
scsi: ufs: handle error to avoid kernel panic
Browse files Browse the repository at this point in the history
storage-qa/generic/010 reported a RAMDUMP on reboot test.

[  532.682030] c7      1 debug-reboot: Create reboot monitor timer now
[  532.695337] c7      1 iommu: Removing device paintbox-ipu from group 54
[  532.702153] c7      1 iommu: Removing device ipu-iommu from group 54
[  532.711121] c5      1 sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  532.720128] c5      1 ufshcd-qcom 1d84000.ufshc: ufshcd_query_attr_retry: query attribute, idn 13, failed with error -19 after 3 retires
[  532.732754] c5      1 ufshcd-qcom 1d84000.ufshc: ufshcd_disable_auto_bkops: failed to enable exception event -19

 -> suspect this causes the below aborts.

[  532.759830] c3      0 Synchronous External Abort: synchronous external abort (0x96000010) at 0xffffff800c80403c
[  532.770231] c3      0 Internal error: : 96000010 [#1] PREEMPT SMP
[  532.776517] c3      0 Modules linked in: ftm5(O) heatmap videobuf2_vmalloc videobuf2_memops lkdtm adsp_loader_dlkm stub_dlkm usf_dlkm native_dlkm machine_dlkm platform_dlkm wcd_cpe_dlkm wsa881x_dlkm wcd934x_dlkm wcd9360_dlkm mbhc_dlkm wcd9xxx_dlkm swr_ctrl_dlkm cs35l36_dlkm q6_dlkm swr_dlkm apr_dlkm q6_notifier_dlkm q6_pdr_dlkm wglink_dlkm wcd_spi_dlkm wcd_core_dlkm pinctrl_wcd_dlkm msm_11ad_proxy wlan(O)
[  532.813577] c3      0 Process swapper/3 (pid: 0, stack limit = 0x00000000aafbbfba)
[  532.821384] c3      0 CPU: 3 PID: 0 Comm: swapper/3 Tainted: G S         O    4.14.180-36668-gf872280691f4_audio-gab11b12 #1

Change-Id: Ic32bc45cc02ef561f75348d69e86d348587d9dd3
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: onettboots <blackcocopet@gmail.com>
  • Loading branch information
Jaegeuk Kim authored and onettboots committed Sep 3, 2024
1 parent 51276d6 commit a2becc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/ufs/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -10265,7 +10265,10 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) ||
!ufshcd_is_runtime_pm(pm_op))) {
/* ensure that bkops is disabled */
ufshcd_disable_auto_bkops(hba);
ret = ufshcd_disable_auto_bkops(hba);
if (ret)
goto enable_gating;

ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode);
if (ret)
goto enable_gating;
Expand Down

0 comments on commit a2becc3

Please sign in to comment.