On Tue, 2023-09-26 at 11:29 -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/22/23 02:09, peter.wang@xxxxxxxxxxxx wrote: > > +/* > > + * If runtime pm send SSU and got timeout, scsi_error_handler > > + * stuck at this function to wait flush_work(&hba->eh_work). > > + * And ufshcd_err_handler(eh_work) stuck at wait runtime pm > active. > > + * Do ufshcd_link_recovery instead shedule eh_work can prevent > > + * dead lock happen. > > + */ > > The above comment is hard to understand because of grammatical > issues. > Please try to improve this comment. A few examples: I think that > "wait" > should be changed into "wait for" and also that "happen" should be > changed > into "to happen". > > > +dev = &hba->ufs_device_wlun->sdev_gendev; > > +if ((dev->power.runtime_status == RPM_RESUMING) || > > +(dev->power.runtime_status == RPM_SUSPENDING)) { > > +err = ufshcd_link_recovery(hba); > > +if (err) { > > +dev_err(hba->dev, "WL Device PM: status:%d, err:%d\n", > > +dev->power.runtime_status, > > +dev->power.runtime_error); > > +} > > +return err; > > +} > > ufshcd_link_recovery() returns a Unix error code (e.g. -ETIMEDOUT) > while > ufshcd_eh_host_reset_handler() should return one of the following > values: > SUCCESS or FAILED. Please fix this. > > Thanks, > > Bart. Hi Bart, Thanks for review. I will correct comment and chnage return value, Also make it more simple by check pm_op_in_progress. Thanks. Peter