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

Shawn Lin shawn.lin at rock-chips.com
Wed Oct 28 17:52:33 PDT 2026


Hi Bart

在 2026/10/29 星期四 4:16, Bart Van Assche 写道:
> 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.
> 

Will do, thanks.

> Bart.
> 
> 




More information about the Linux-rockchip mailing list