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

From: Peter Wang (王信友)

Date: Wed Nov 19 2025 - 04:18:17 EST


On Tue, 2025-11-18 at 15:26 +0800, Brian Kao wrote
>
> 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
>     ....
> ```

Hi Brian,

You mean that the suspend level sets the link to off, and then
ufshcd_reset_and_restore encounters an error during the resume
flow, right? This does seem to be a potential issue.

Thanks
Peter