[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490203539-228029-13-git-send-email-john.garry@huawei.com>
Date: Thu, 23 Mar 2017 01:25:28 +0800
From: John Garry <john.garry@...wei.com>
To: <jejb@...ux.vnet.ibm.com>, <martin.petersen@...cle.com>
CC: <linuxarm@...wei.com>, <john.garry2@...l.dcu.ie>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<zhangfei.gao@...aro.org>, Xiang Chen <chenxiang66@...ilicon.com>,
John Garry <john.garry@...wei.com>
Subject: [PATCH 12/23] scsi: hisi_sas: free slots after hardreset
From: Xiang Chen <chenxiang66@...ilicon.com>
After hardreset, we clear up IOs of remote disks, so we
need to free those slots in LLDD.
Signed-off-by: Xiang Chen <chenxiang66@...ilicon.com>
Signed-off-by: John Garry <john.garry@...wei.com>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 19f2892..49cac22 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1028,11 +1028,12 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device)
rc = hisi_sas_debug_I_T_nexus_reset(device);
- spin_lock_irqsave(&hisi_hba->lock, flags);
- hisi_sas_release_task(hisi_hba, device);
- spin_unlock_irqrestore(&hisi_hba->lock, flags);
-
- return 0;
+ if (rc == TMF_RESP_FUNC_COMPLETE) {
+ spin_lock_irqsave(&hisi_hba->lock, flags);
+ hisi_sas_release_task(hisi_hba, device);
+ spin_unlock_irqrestore(&hisi_hba->lock, flags);
+ }
+ return rc;
}
static int hisi_sas_lu_reset(struct domain_device *device, u8 *lun)
--
1.9.1
Powered by blists - more mailing lists