On 9/27/21 12:39 AM, Kiwoong Kim wrote:
I have one question about ufshcd_clear_ua_wluns in ufshcd_err_handling_unprepare. You probably know a scsi command (request sense) is issued in there to clear UAC for W-LUs. Let's think about a situation that a read command is timed-out. And then scmd_eh_abort_handler is called, shost's state is transitioned to SHOST_RECOVERY and scsi_sh is waken up. If this is the case that the scsi_eh goes up to eh_host_reset_handler, ufshcd_eh_host_reset_handler queues ufshcd_err_handler and waits for its completion. And this function can call ufshcd_err_handling_unprepare at the end. But I think, at this time, the scsi command, i.e. request sense, could not be dispatched because of the shost's state. Is it needed to be fixed or did I miss something?
Hi Kiwoong, Please help with reviewing this patch series since this series should resolve the issue described above: https://lore.kernel.org/linux-scsi/20210922093842.18025-1-adrian.hunter@xxxxxxxxx/ Thanks, Bart.