]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: hisi_sas: delete timer when removing hisi_sas driver
authorXiang Chen <chenxiang66@hisilicon.com>
Fri, 23 Mar 2018 16:05:10 +0000 (00:05 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 18 Apr 2018 23:32:51 +0000 (19:32 -0400)
Delete timer for v1 and v3 hw when removing hisi_sas driver.

Signed-off-by: Xiang chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index 49c1fa6438030bd4f0bba526b1a8bcc2c27c50b4..a216795741428d00535144bb6ecdac01dc7fa7e1 100644 (file)
@@ -2177,6 +2177,9 @@ int hisi_sas_remove(struct platform_device *pdev)
        struct hisi_hba *hisi_hba = sha->lldd_ha;
        struct Scsi_Host *shost = sha->core.shost;
 
+       if (timer_pending(&hisi_hba->timer))
+               del_timer(&hisi_hba->timer);
+
        sas_unregister_ha(sha);
        sas_remove_host(sha->core.shost);
 
index 89b9505c06541a71f3bd97885e71fccfde6e5f87..bed6afb324a1ede76617817ff6d5434bb0d001ca 100644 (file)
@@ -3599,9 +3599,6 @@ static int hisi_sas_v2_remove(struct platform_device *pdev)
        struct sas_ha_struct *sha = platform_get_drvdata(pdev);
        struct hisi_hba *hisi_hba = sha->lldd_ha;
 
-       if (timer_pending(&hisi_hba->timer))
-               del_timer(&hisi_hba->timer);
-
        hisi_sas_kill_tasklets(hisi_hba);
 
        return hisi_sas_remove(pdev);
index df5414a0bdd970cb3178813197b60c4c064217c6..efe64bcfa4f240c9fac849284d3ca3fc84a82a5c 100644 (file)
@@ -2183,6 +2183,9 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev)
        struct hisi_hba *hisi_hba = sha->lldd_ha;
        struct Scsi_Host *shost = sha->core.shost;
 
+       if (timer_pending(&hisi_hba->timer))
+               del_timer(&hisi_hba->timer);
+
        sas_unregister_ha(sha);
        sas_remove_host(sha->core.shost);