Re: [PATCH v10 01/11] ufs: core: Return a negative errno from WLUN suspend/resume
From: Bart Van Assche
Date: Tue Nov 03 2026 - 13:48:48 EST
On 11/3/26 5:32 AM, Larisa Grigore wrote:
__ufshcd_wl_suspend() and __ufshcd_wl_resume() may return a positive resultReviewed-by: Bart Van Assche <bvanassche@xxxxxxx>
code, e.g. from ufshcd_link_startup() when DME link startup fails while
restoring the link.
The runtime PM core treats any non-zero value as a failure of the WLUN,
but rpm_get_suppliers() only checks for a negative value. The LUs
consuming the WLUN are thus reported as resumed and receive I/O while
the WLUN is still suspended.
Convert positive values to -EIO, as ufshcd_init() already does.
Do the same in __ufshcd_wl_suspend() for consistency, so that callers
always get a negative errno.