Forget a condition: eh_work scheduled but do not start to work.

Signed-off-by: Zang Leigang <zangleig...@hisilicon.com>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index e050dcea1bea..a2dff12713fc 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5807,7 +5807,8 @@ static int ufshcd_eh_host_reset_handler(struct scsi_cmnd 
*cmd)
        do {
                spin_lock_irqsave(hba->host->host_lock, flags);
                if (!(work_pending(&hba->eh_work) ||
-                               hba->ufshcd_state == UFSHCD_STATE_RESET))
+                           hba->ufshcd_state == UFSHCD_STATE_RESET ||
+                           hba->ufshcd_state == UFSHCD_STATE_EH_SCHEDULED))
                        break;
                spin_unlock_irqrestore(hba->host->host_lock, flags);
                dev_dbg(hba->dev, "%s: reset in progress\n", __func__);
-- 
2.13.0

Reply via email to