We set ufshcd_state to UFSHCD_STATE_ERROR when an err handler
fails. So I think UFSHCD_STATE_ERROR means host not works any more.
Set it before schedule eh_work is not correct.

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

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 05c7456..a7724ad 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4158,7 +4158,6 @@ static void ufshcd_check_errors(struct ufs_hba *hba)
                        /* block commands from scsi mid-layer */
                        scsi_block_requests(hba->host);
 
-                       hba->ufshcd_state = UFSHCD_STATE_ERROR;
                        schedule_work(&hba->eh_work);
                }
        }
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to