[PATCH v5] ufs: core: wlun send SSU timeout recovery

Peter Wang (王信友) peter.wang at mediatek.com
Wed Sep 27 18:58:53 PDT 2023


On Wed, 2023-09-27 at 11:31 -0700, Bart Van Assche wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On 9/26/23 20:35, peter.wang at mediatek.com wrote:
> > +if (hba->pm_op_in_progress) {
> > +if (ufshcd_link_recovery(hba))
> > +err = FAILED;
> > +
> > +return err;
> > +}
> 
> This patch looks good to me but I wish the above code would have been
> written using the style that is preferred in the Linux kernel:
> 
> if (hba->pm_op_in_progress && ufshcd_link_recovery(hba) < 0)
> return FAILED;
> 
> Thanks,
> 
> Bart.
> 

Hi Bart,

It looks more concise but cannot help in this deadlock case.
Because if pm_op_in_progress is true, and ufshcd_link_recovery return
0, we should return SUCCESS directly, else go forward in this function
eh_work will be triggered and deadlock happen.

Thanks.
Peter



More information about the Linux-mediatek mailing list