mbox series

[v4,00/10] Complementary changes for error handling

Message ID 1624433711-9339-1-git-send-email-cang@codeaurora.org
Headers show
Series Complementary changes for error handling | expand

Message

Can Guo June 23, 2021, 7:34 a.m. UTC
Commit cb7e6f05fce67c965194ac04467e1ba7bc70b069 ("scsi: ufs: core: Enable
power management for wlun") makes the UFS device W-LU the supplier, based
on which we need to make some changes to accomodate error handling.

This series is tested by fault injections (to IRQ handler, UIC cmds and
task abort where error handler can possibley be invoked) in all possible
contexts, e.g., scaling, gating, runtime and system suspend/resume.

Below changes are tested as a whole and based on 5.14/scsi-staging.

Changes from v3:
- Split the first change in v2 into 2 changes (to address comments from Adrian)
- Removed the host_sem used in suspend/resume and use lock/unlock_system_sleep() in error handler (suggested by Bart).

Changes from v2:
- Added 3 more changes to this series.

Changes from v1:
- Rebased on series "Optimize host lock on TR send/compl paths and utilize UTRLCNR".
- Minor update to the 6th change.

Can Guo (10):
  scsi: ufs: Rename flags pm_op_in_progress and is_sys_suspended
  scsi: ufs: Add flags pm_op_in_progress and is_sys_suspended
  scsi: ufs: Update the return value of supplier pm ops
  scsi: ufs: Enable IRQ after enabling clocks in error handling
    preparation
  scsi: ufs: Remove a redundant tag check in ufshcd_queuecommand()
  scsi: ufs: Remove host_sem used in suspend/resume
  scsi: ufs: Simplify error handling preparation
  scsi: ufs: Update ufshcd_recover_pm_error()
  scsi: ufs: Update the fast abort path in ufshcd_abort() for PM
    requests
  scsi: ufs: Apply more limitations to user access

 drivers/scsi/ufs/ufs-debugfs.c |  27 +----
 drivers/scsi/ufs/ufs-qcom.c    |   2 +-
 drivers/scsi/ufs/ufs-sysfs.c   | 105 ++++++-----------
 drivers/scsi/ufs/ufs_bsg.c     |  16 +--
 drivers/scsi/ufs/ufshcd.c      | 262 ++++++++++++++++++++++-------------------
 drivers/scsi/ufs/ufshcd.h      |  25 +++-
 6 files changed, 212 insertions(+), 225 deletions(-)