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-queue. 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 (6): scsi: ufs: Differentiate status between hba pm ops and wl pm ops scsi: ufs: Update the return value of supplier pm ops scsi: ufs: Simplify error handling preparation scsi: ufs: Update ufshcd_recover_pm_error() scsi: ufs: Let host_sem cover the entire system suspend/resume scsi: ufs: Update the fast abort path in ufshcd_abort() for PM requests drivers/scsi/ufs/ufshcd.c | 196 ++++++++++++++++++++++++++-------------------- drivers/scsi/ufs/ufshcd.h | 4 +- 2 files changed, 113 insertions(+), 87 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.