Re: [RFC PATCH] scsi: ufs: core: Allow error recovery before the device W-LUN exists
From: Peter Wang
Date: Mon Nov 02 2026 - 03:48:55 EST
On Mon, 2026-11-02 at 02:36 +0200, Asdlerto Korry wrote:
> ufshcd_err_handling_should_stop() returns true while hba-
> >ufs_device_wlun
> is NULL, i.e. until the first probe has added the device W-LUN. If
> the
> link fails during that first probe (for example NOP OUT failing after
> link startup), the error handler therefore never resets the host or
> the
> link: it only marks the state operational and returns, and the probe
> keeps failing until it gives up.
>
> On a Samsung Galaxy M52 5G (SM7325) the first link startup regularly
> ends in PA errors (LINERESET). With the W-LUN check removed, the
> error
> handler performs a real host reset and restore and the device comes
> up;
> without it, it never does.
Hi Asdlerto,
I’m a bit curious why the first link startup fails, while
the link startup after a reset and restore doesn’t.
Shouldn’t these two flows be identical?
I think the driver is designed on the assumption that the
basic init must succeed, and that only a re-init can make
recovery possible.
Thanks.
Peter