lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <29741121-9edd-4833-9346-e4c6c427cd2c@acm.org>
Date: Fri, 30 Jan 2026 14:55:17 -0800
From: Bart Van Assche <bvanassche@....org>
To: Po-Wen Kao <powenkao@...gle.com>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Peter Wang <peter.wang@...iatek.com>, Bean Huo <beanhuo@...ron.com>,
 Adrian Hunter <adrian.hunter@...el.com>,
 "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
 "open list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER"
 <linux-scsi@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] scsi: ufs: core: Schedule EH on WLUN resume failure

On 1/22/26 8:54 PM, Po-Wen Kao wrote:
> From: Brian Kao <powenkao@...gle.com>
> 
> On WLUN resume failed, core driver leaves wlun dev in error runtime
> PM state without taking further action. To ensure the driver can recover
> from such errors, this patch schedules the error handler to perform
> a full reset when error occurs during WLUN resume.
> 
> Signed-off-by: Brian Kao <powenkao@...gle.com>
> ---
>   drivers/ufs/core/ufshcd.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 057678f4c50a..ac4db8484ee5 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -10236,6 +10236,15 @@ static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
>   	hba->clk_gating.is_suspended = false;
>   	ufshcd_release(hba);
>   	hba->pm_op_in_progress = false;
> +
> +	if (ret) {
> +		/* ufshcd_reset_and_restore() might set host to UFSHCD_STATE_ERROR */
> +		scoped_guard(spinlock_irqsave, hba->host->host_lock)
> +			hba->ufshcd_state = UFSHCD_STATE_RESET;
> +
> +		ufshcd_force_error_recovery(hba);
> +	}
> +
>   	return ret;
>   }
Isn't the hba->ufshcd_state assignment needed for all
ufshcd_force_error_recovery() callers? I'm wondering whether that
assignment should be moved into ufshcd_force_error_recovery().

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ