From 0c521892b0de79fb0890732357df14145dd6e2ca Mon Sep 17 00:00:00 2001 From: John Garry Date: Wed, 2 May 2018 23:56:29 +0800 Subject: [PATCH] scsi: hisi_sas: stop controller timer for reset BugLink: https://bugs.launchpad.net/bugs/1774466 We should only have the timer enabled after PHY up after controller reset, so disable prior to reset. Signed-off-by: John Garry Signed-off-by: Xiaofei Tan Signed-off-by: Martin K. Petersen (cherry picked from commit 6f7c32d6057cad05cf057b14c910659a8d06c975 linux-next) Signed-off-by: dann frazier Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza Signed-off-by: Khalid Elmously --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 07125e311ad9..acf1b24baa24 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1131,6 +1131,9 @@ static int hisi_sas_controller_reset(struct hisi_hba *hisi_hba) old_state = hisi_hba->hw->get_phys_state(hisi_hba); scsi_block_requests(shost); + if (timer_pending(&hisi_hba->timer)) + del_timer_sync(&hisi_hba->timer); + set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); rc = hisi_hba->hw->soft_reset(hisi_hba); if (rc) { -- 2.39.2