summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2019-05-29 17:58:42 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-18 19:46:24 -0400
commit6c86e046cf97b4a03d6166ba95b3f448455abbb0 (patch)
treea493672d894229b938f6e27b41c12a7f58222f6e /drivers/scsi/hisi_sas
parentb3b2a9f60fd9e38c45d4728cac78ddf5596f3bb0 (diff)
downloadblackbird-op-linux-6c86e046cf97b4a03d6166ba95b3f448455abbb0.tar.gz
blackbird-op-linux-6c86e046cf97b4a03d6166ba95b3f448455abbb0.zip
scsi: hisi_sas: Delete PHY timers when rmmod or probe failed
When removing the driver or when probe fails, we need to delete the PHY timers. 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>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 8a7feb8ed8d6..256f93e6f89f 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -2480,6 +2480,14 @@ EXPORT_SYMBOL_GPL(hisi_sas_alloc);
void hisi_sas_free(struct hisi_hba *hisi_hba)
{
+ int i;
+
+ for (i = 0; i < hisi_hba->n_phy; i++) {
+ struct hisi_sas_phy *phy = &hisi_hba->phy[i];
+
+ del_timer_sync(&phy->timer);
+ }
+
if (hisi_hba->wq)
destroy_workqueue(hisi_hba->wq);
}
OpenPOWER on IntegriCloud