[PATCH] scsi: ufs: core: Retry the full device init on fatal link loss

Bart Van Assche bvanassche at acm.org
Wed Oct 28 13:16:02 PDT 2026


On 10/28/26 12:31 AM, Shawn Lin wrote:
> +retry_init:
>   	hba->ufshcd_state = UFSHCD_STATE_RESET;
>   
>   	err = ufshcd_link_startup(hba);
>   	if (err)
> -		goto out_release;
> +		goto retry_device_init;

Move the code that needs to be repeated into a new function in a first
patch and add a loop around the call site of that new function in a
second patch. Don't change ufshcd_init() into a goto-spaghetti.

Bart.




More information about the Linux-rockchip mailing list