Re: [PATCH 1/1] scsi: ufs: core: Fix EH failure after wlun resume error

From: Brian Kao

Date: Tue Nov 18 2025 - 02:33:53 EST


> Fault injection using saved_uic_err could create this situation,
> but if this cannot happen in reality, we should consider whether
> this is a reasonable test case? If it is, then I think this patch
> looks good to me. If not, maybe we should get the runtime PM state
> in the fault injection and remove this redundant recovery code.
> What do you think?

Hi Peter,

Sorry that I didn't mention that this is in the resume path.
The resume flow in bellow will re-enable IRQ and go through full
re-initialization which potentially trigger issue I described
previously
```
ufshcd_resume()
ufshcd_enable_irq(hba);
ufshcd_wl_resume()
ufshcd_reset_and_restore() <== depends
on PM level
ufshcd_hba_enable()
ufshcd_probe_hba()
ufshcd_set_dev_pwr_mode(hba, UFS_ACTIVE_PWR_MODE); <== EH is
scheduled before this point
....
```