We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc71899 commit 971237bCopy full SHA for 971237b
drivers/ufs/core/ufshcd.c
@@ -7708,6 +7708,19 @@ static int ufshcd_eh_host_reset_handler(struct scsi_cmnd *cmd)
7708
7709
hba = shost_priv(cmd->device->host);
7710
7711
+ /*
7712
+ * If runtime PM sent SSU and got a timeout, scsi_error_handler is
7713
+ * stuck in this function waiting for flush_work(&hba->eh_work). And
7714
+ * ufshcd_err_handler(eh_work) is stuck waiting for runtime PM. Do
7715
+ * ufshcd_link_recovery instead of eh_work to prevent deadlock.
7716
+ */
7717
+ if (hba->pm_op_in_progress) {
7718
+ if (ufshcd_link_recovery(hba))
7719
+ err = FAILED;
7720
+
7721
+ return err;
7722
+ }
7723
7724
spin_lock_irqsave(hba->host->host_lock, flags);
7725
hba->force_reset = true;
7726
ufshcd_schedule_eh_work(hba);
0 commit comments