Skip to content

Fix up and simplify error recovery mechanism

Can Guo linux-arm-kernel linux-arm-msm linux-mediatek linux-scsi lkml 13 versions – Applied

Status from this message: Applied to my staging tree. You'll get a formal merge message once 5.10

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest9 patches 3 repliesApplied
  2. v109 patches 0 repliesSuperseded
  3. v9 posting 2/20 of 9 patches 0 repliesSuperseded
Earlier versions · 10
VersionPostedPatchesRepliesStatus
v9 posting 1/29 patches5 repliesSuperseded
v8 posting 2/28 patches0 repliesSuperseded
v8 posting 1/28 patches0 repliesSuperseded
v78 patches10 repliesSuperseded
v68 patches4 repliesSuperseded
v59 patches3 repliesSuperseded
v48 patches2 repliesSuperseded
v34 patches3 repliesSuperseded
v24 patches9 repliesSuperseded
v14 patches0 repliesSuperseded

Changes in v11 from the cover letter

- Incorporated Markus Elfring's comments

Patches in v11 Applied

#Subject and filesSizeRepliesApplied
1/9scsi: ufs: Add checks before setting clk-gating statesdrivers/scsi/ufs/ufshcd.c+14 -30 replies
2/9ufs: ufs-qcom: Fix race conditions caused by func ufs_qcom_testbus_configdrivers/scsi/ufs/ufs-qcom.c+0 -50 replies
3/9scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regsdrivers/scsi/ufs/ufs-qcom.c+0 -320 replies
4/9scsi: ufs: Add some debug infos to ufshcd_print_host_statedrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+23 -130 replies
5/9scsi: ufs: Fix concurrency of error handler and other error recovery pathsdrivers/scsi/ufs/ufs-sysfs.c drivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+150 -1280 replies
6/9scsi: ufs: Recover hba runtime PM error in error handlerdrivers/scsi/ufs/ufshcd.c+99 -90 replies
7/9scsi: ufs: Move dumps in IRQ handler to error handlerdrivers/scsi/ufs/ufshcd.c+15 -80 replies
8/9scsi: ufs: Fix a racing problem btw error handler and runtime PM opsdrivers/scsi/ufs/ufshcd.c+51 -340 replies
9/9scsi: ufs: Properly release resources if a task is aborted successfullydrivers/scsi/ufs/ufshcd.c+1 -40 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchHongwu SuAvri AltmanBean HuoAsutosh DasStanley Chu
1/9R-b R-b R-b R-b R-b
2/9R-b R-b R-b R-b
3/9R-b R-b R-b R-b
4/9R-b R-b R-b R-b R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v11 thread

Cover letter [PATCH v11 0/9] Fix up and simplify error recovery mechanism

The changes have been tested with error injections of multiple error types (and all kinds of mixture of them) during runtime, e.g. hibern8 enter/ exit error, power mode change error and fatal/non-fatal error from IRQ context. During the test, error injections happen randomly across all contexts, e.g. clk scaling, clk gate/ungate, runtime suspend/resume and IRQ.

There are a few more fixes to resolve other minor problems based on the main change, such as LINERESET handling and racing btw error handler and system suspend/resume/shutdown, but they will be pushed after this series is taken, due to there are already too many lines in these changes.

Change since v10:
- Incorporated Markus Elfring's comments

Change since v9:
- Fixed compilation warning from option [-Werror=implicit-fallthrough=] in patch "scsi: ufs: Fix a racing problem btw error handler and runtime PM ops"

Change since v8:
- Added one more fix to ufshcd_abort as requested by Stanley Chu

Change since v7:
- Incorporated Asutosh's comments
- Refined patch "scsi: ufs: Recover hba runtime PM error in error handler"

Change since v6:
- Modified change "scsi: ufs-qcom: Fix schedule while atomic error in ufs_qcom_dump_dbg_regs" to "scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs"

Change since v5:
- Dropped change "scsi: ufs: Fix imbalanced scsi_block_reqs_cnt caused by ufshcd_hold()" as it is not quite related with this series
- Refined func ufshcd_err_handling_prepare in change "scsi: ufs: Recover hba runtime PM error in error handler"

Change since v4:
- Split the original change "ufs: ufs-qcom: Fix a few BUGs in func ufs_qcom_dump_dbg_regs()" to 2 small changes

Change since v3:
- Split the original change "scsi: ufs: Fix up and simplify error recovery mechanism" into 5 changes

Change since v2:
- Incorporate Bart's comment to change "scsi: ufs: Add checks before setting clk-gating states"
- Revised the commit msg of change "scsi: ufs: Fix up and simplify error recovery mechanism"

Change since v1:
- Fixed a compilation error in case that CONFIG_PM is N

Can Guo (9):
scsi: ufs: Add checks before setting clk-gating states
ufs: ufs-qcom: Fix race conditions caused by func
ufs_qcom_testbus_config
scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs
scsi: ufs: Add some debug infos to ufshcd_print_host_state
scsi: ufs: Fix concurrency of error handler and other error recovery
paths
scsi: ufs: Recover hba runtime PM error in error handler
scsi: ufs: Move dumps in IRQ handler to error handler
scsi: ufs: Fix a racing problem btw error handler and runtime PM ops
scsi: ufs: Properly release resources if a task is aborted
successfully

 drivers/scsi/ufs/ufs-qcom.c  |  37 ----
 drivers/scsi/ufs/ufs-sysfs.c |   1 +
 drivers/scsi/ufs/ufshcd.c    | 509 +++++++++++++++++++++++++++----------------
 drivers/scsi/ufs/ufshcd.h    |  14 ++
 4 files changed, 339 insertions(+), 222 deletions(-)
Signature · 1 line
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.