aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-09 01:41:51 -0500
committerDan Williams <dan.j.williams@intel.com>2012-05-17 17:33:37 -0400
commit5b6bf225e7fc249c703e19bf2c983d1a59178874 (patch)
tree9c9b855474b77323c0d89b33ac224e0c1f016c73 /drivers/scsi/isci
parent726980d56908f2e230624394f03743689db3110c (diff)
isci: Manage device suspensions during TC terminations.
TCs must be terminated only while the RNC is suspended. This commit adds remote device suspensions and resumptions in the abort, reset and termination paths. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/remote_device.c90
-rw-r--r--drivers/scsi/isci/remote_device.h33
-rw-r--r--drivers/scsi/isci/task.c80
3 files changed, 154 insertions, 49 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index 9f03877534d..4f76dcd1cec 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -143,6 +143,12 @@ static enum sci_status sci_remote_device_suspend(
143 NULL, NULL); 143 NULL, NULL);
144} 144}
145 145
146static int isci_remote_device_suspendcheck(struct isci_remote_device *idev)
147{
148 return test_bit(IDEV_TXRX_SUSPENDED, &idev->flags)
149 || !test_bit(IDEV_ALLOCATED, &idev->flags);
150}
151
146enum sci_status isci_remote_device_suspend( 152enum sci_status isci_remote_device_suspend(
147 struct isci_host *ihost, 153 struct isci_host *ihost,
148 struct isci_remote_device *idev) 154 struct isci_remote_device *idev)
@@ -151,18 +157,18 @@ enum sci_status isci_remote_device_suspend(
151 unsigned long flags; 157 unsigned long flags;
152 158
153 spin_lock_irqsave(&ihost->scic_lock, flags); 159 spin_lock_irqsave(&ihost->scic_lock, flags);
154 160 if (isci_get_device(idev->domain_dev) == NULL) {
155 if (isci_lookup_device(idev->domain_dev) == NULL) {
156 spin_unlock_irqrestore(&ihost->scic_lock, flags); 161 spin_unlock_irqrestore(&ihost->scic_lock, flags);
157 status = SCI_FAILURE; 162 status = SCI_FAILURE;
158 } else { 163 } else {
159 status = sci_remote_device_suspend(idev); 164 status = sci_remote_device_suspend(idev);
160 spin_unlock_irqrestore(&ihost->scic_lock, flags); 165 spin_unlock_irqrestore(&ihost->scic_lock, flags);
161 if (status == SCI_SUCCESS) { 166 if (status == SCI_SUCCESS) {
167 dev_dbg(&ihost->pdev->dev,
168 "%s: idev=%p, about to wait\n",
169 __func__, idev);
162 wait_event(ihost->eventq, 170 wait_event(ihost->eventq,
163 test_bit(IDEV_TXRX_SUSPENDED, &idev->flags) 171 isci_remote_device_suspendcheck(idev));
164 || !test_bit(IDEV_ALLOCATED, &idev->flags));
165
166 status = test_bit(IDEV_TXRX_SUSPENDED, &idev->flags) 172 status = test_bit(IDEV_TXRX_SUSPENDED, &idev->flags)
167 ? SCI_SUCCESS : SCI_FAILURE; 173 ? SCI_SUCCESS : SCI_FAILURE;
168 dev_dbg(&ihost->pdev->dev, 174 dev_dbg(&ihost->pdev->dev,
@@ -171,7 +177,10 @@ enum sci_status isci_remote_device_suspend(
171 test_bit(IDEV_TXRX_SUSPENDED, &idev->flags) 177 test_bit(IDEV_TXRX_SUSPENDED, &idev->flags)
172 ? "<suspended>" : "<deallocated!>"); 178 ? "<suspended>" : "<deallocated!>");
173 179
174 } 180 } else
181 dev_dbg(scirdev_to_dev(idev),
182 "%s: sci_remote_device_suspend failed, "
183 "status = %d\n", __func__, status);
175 isci_put_device(idev); 184 isci_put_device(idev);
176 } 185 }
177 return status; 186 return status;
@@ -1218,6 +1227,35 @@ static enum sci_status sci_remote_device_ea_construct(struct isci_port *iport,
1218 return SCI_SUCCESS; 1227 return SCI_SUCCESS;
1219} 1228}
1220 1229
1230enum sci_status sci_remote_device_resume(
1231 struct isci_remote_device *idev,
1232 scics_sds_remote_node_context_callback cb_fn,
1233 void *cb_p)
1234{
1235 enum sci_status status;
1236
1237 status = sci_remote_node_context_resume(&idev->rnc, cb_fn, cb_p);
1238 if (status != SCI_SUCCESS)
1239 dev_dbg(scirdev_to_dev(idev), "%s: failed to resume: %d\n",
1240 __func__, status);
1241 return status;
1242}
1243
1244enum sci_status isci_remote_device_resume(
1245 struct isci_host *ihost,
1246 struct isci_remote_device *idev,
1247 scics_sds_remote_node_context_callback cb_fn,
1248 void *cb_p)
1249{
1250 unsigned long flags;
1251 enum sci_status status;
1252
1253 spin_lock_irqsave(&ihost->scic_lock, flags);
1254 status = sci_remote_device_resume(idev, cb_fn, cb_p);
1255 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1256
1257 return status;
1258}
1221/** 1259/**
1222 * sci_remote_device_start() - This method will start the supplied remote 1260 * sci_remote_device_start() - This method will start the supplied remote
1223 * device. This method enables normal IO requests to flow through to the 1261 * device. This method enables normal IO requests to flow through to the
@@ -1244,9 +1282,8 @@ static enum sci_status sci_remote_device_start(struct isci_remote_device *idev,
1244 return SCI_FAILURE_INVALID_STATE; 1282 return SCI_FAILURE_INVALID_STATE;
1245 } 1283 }
1246 1284
1247 status = sci_remote_node_context_resume(&idev->rnc, 1285 status = sci_remote_device_resume(idev, remote_device_resume_done,
1248 remote_device_resume_done, 1286 idev);
1249 idev);
1250 if (status != SCI_SUCCESS) 1287 if (status != SCI_SUCCESS)
1251 return status; 1288 return status;
1252 1289
@@ -1461,26 +1498,29 @@ int isci_remote_device_found(struct domain_device *dev)
1461} 1498}
1462 1499
1463enum sci_status isci_remote_device_reset( 1500enum sci_status isci_remote_device_reset(
1501 struct isci_host *ihost,
1464 struct isci_remote_device *idev) 1502 struct isci_remote_device *idev)
1465{ 1503{
1466 struct isci_host *ihost = dev_to_ihost(idev->domain_dev);
1467 unsigned long flags; 1504 unsigned long flags;
1468 enum sci_status status; 1505 enum sci_status status;
1469 1506
1470 /* Wait for the device suspend. */ 1507 /* Put the device into a reset state so the suspension will not
1471 status = isci_remote_device_suspend(ihost, idev); 1508 * automatically resume.
1509 */
1510 spin_lock_irqsave(&ihost->scic_lock, flags);
1511 status = sci_remote_device_reset(idev);
1512 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1472 if (status != SCI_SUCCESS) { 1513 if (status != SCI_SUCCESS) {
1473 dev_dbg(&ihost->pdev->dev, 1514 dev_dbg(&ihost->pdev->dev,
1474 "%s: isci_remote_device_suspend(%p) returned %d!\n", 1515 "%s: sci_remote_device_reset(%p) returned %d!\n",
1475 __func__, idev, status); 1516 __func__, idev, status);
1476 return status; 1517 return status;
1477 } 1518 }
1478 spin_lock_irqsave(&ihost->scic_lock, flags); 1519 /* Wait for the device suspend. */
1479 status = sci_remote_device_reset(idev); 1520 status = isci_remote_device_suspend(ihost, idev);
1480 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1481 if (status != SCI_SUCCESS) { 1521 if (status != SCI_SUCCESS) {
1482 dev_dbg(&ihost->pdev->dev, 1522 dev_dbg(&ihost->pdev->dev,
1483 "%s: sci_remote_device_reset(%p) returned %d!\n", 1523 "%s: isci_remote_device_suspend(%p) returned %d!\n",
1484 __func__, idev, status); 1524 __func__, idev, status);
1485 } 1525 }
1486 return status; 1526 return status;
@@ -1497,3 +1537,19 @@ enum sci_status sci_remote_device_abort_requests_pending_abort(
1497{ 1537{
1498 return sci_remote_device_terminate_requests_checkabort(idev, 1); 1538 return sci_remote_device_terminate_requests_checkabort(idev, 1);
1499} 1539}
1540
1541enum sci_status isci_remote_device_reset_complete(
1542 struct isci_host *ihost,
1543 struct isci_remote_device *idev)
1544{
1545 unsigned long flags;
1546 enum sci_status status;
1547
1548 spin_lock_irqsave(&ihost->scic_lock, flags);
1549 status = sci_remote_device_reset_complete(idev);
1550 sci_remote_device_resume(idev, NULL, NULL);
1551 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1552
1553 return status;
1554}
1555
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index ae508ee3366..a6a376e200e 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -106,6 +106,16 @@ struct isci_remote_device {
106#define ISCI_REMOTE_DEVICE_START_TIMEOUT 5000 106#define ISCI_REMOTE_DEVICE_START_TIMEOUT 5000
107 107
108/* device reference routines must be called under sci_lock */ 108/* device reference routines must be called under sci_lock */
109static inline struct isci_remote_device *isci_get_device(
110 struct domain_device *dev)
111{
112 struct isci_remote_device *idev = dev->lldd_dev;
113
114 if (idev)
115 kref_get(&idev->kref);
116 return idev;
117}
118
109static inline struct isci_remote_device *isci_lookup_device(struct domain_device *dev) 119static inline struct isci_remote_device *isci_lookup_device(struct domain_device *dev)
110{ 120{
111 struct isci_remote_device *idev = dev->lldd_dev; 121 struct isci_remote_device *idev = dev->lldd_dev;
@@ -345,4 +355,27 @@ int isci_remote_device_is_safe_to_abort(
345enum sci_status 355enum sci_status
346sci_remote_device_abort_requests_pending_abort( 356sci_remote_device_abort_requests_pending_abort(
347 struct isci_remote_device *idev); 357 struct isci_remote_device *idev);
358
359enum sci_status isci_remote_device_suspend(
360 struct isci_host *ihost,
361 struct isci_remote_device *idev);
362
363enum sci_status sci_remote_device_resume(
364 struct isci_remote_device *idev,
365 scics_sds_remote_node_context_callback cb_fn,
366 void *cb_p);
367
368enum sci_status isci_remote_device_resume(
369 struct isci_host *ihost,
370 struct isci_remote_device *idev,
371 scics_sds_remote_node_context_callback cb_fn,
372 void *cb_p);
373
374enum sci_status isci_remote_device_reset(
375 struct isci_host *ihost,
376 struct isci_remote_device *idev);
377
378enum sci_status isci_remote_device_reset_complete(
379 struct isci_host *ihost,
380 struct isci_remote_device *idev);
348#endif /* !defined(_ISCI_REMOTE_DEVICE_H_) */ 381#endif /* !defined(_ISCI_REMOTE_DEVICE_H_) */
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 374254ede9d..9b8632f33dd 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -716,6 +716,8 @@ void isci_terminate_pending_requests(struct isci_host *ihost,
716 unsigned long flags; 716 unsigned long flags;
717 LIST_HEAD(list); 717 LIST_HEAD(list);
718 718
719 isci_remote_device_suspend(ihost, idev);
720
719 spin_lock_irqsave(&ihost->scic_lock, flags); 721 spin_lock_irqsave(&ihost->scic_lock, flags);
720 list_splice_init(&idev->reqs_in_process, &list); 722 list_splice_init(&idev->reqs_in_process, &list);
721 723
@@ -826,40 +828,47 @@ static int isci_task_send_lu_reset_sas(
826 828
827int isci_task_lu_reset(struct domain_device *dev, u8 *lun) 829int isci_task_lu_reset(struct domain_device *dev, u8 *lun)
828{ 830{
829 struct isci_host *isci_host = dev_to_ihost(dev); 831 struct isci_host *ihost = dev_to_ihost(dev);
830 struct isci_remote_device *isci_device; 832 struct isci_remote_device *isci_device;
831 unsigned long flags; 833 unsigned long flags;
832 int ret; 834 int ret;
833 835
834 spin_lock_irqsave(&isci_host->scic_lock, flags); 836 spin_lock_irqsave(&ihost->scic_lock, flags);
835 isci_device = isci_lookup_device(dev); 837 isci_device = isci_lookup_device(dev);
836 spin_unlock_irqrestore(&isci_host->scic_lock, flags); 838 spin_unlock_irqrestore(&ihost->scic_lock, flags);
837 839
838 dev_dbg(&isci_host->pdev->dev, 840 dev_dbg(&ihost->pdev->dev,
839 "%s: domain_device=%p, isci_host=%p; isci_device=%p\n", 841 "%s: domain_device=%p, isci_host=%p; isci_device=%p\n",
840 __func__, dev, isci_host, isci_device); 842 __func__, dev, ihost, isci_device);
841 843
842 if (!isci_device) { 844 if (!isci_device) {
843 /* If the device is gone, stop the escalations. */ 845 /* If the device is gone, stop the escalations. */
844 dev_dbg(&isci_host->pdev->dev, "%s: No dev\n", __func__); 846 dev_dbg(&ihost->pdev->dev, "%s: No dev\n", __func__);
845 847
846 ret = TMF_RESP_FUNC_COMPLETE; 848 ret = TMF_RESP_FUNC_COMPLETE;
847 goto out; 849 goto out;
848 } 850 }
851 if (isci_remote_device_suspend(ihost, isci_device) != SCI_SUCCESS) {
852 dev_dbg(&ihost->pdev->dev,
853 "%s: device = %p; failed to suspend\n",
854 __func__, isci_device);
855 ret = TMF_RESP_FUNC_FAILED;
856 goto out;
857 }
849 858
850 /* Send the task management part of the reset. */ 859 /* Send the task management part of the reset. */
851 if (dev_is_sata(dev)) { 860 if (dev_is_sata(dev)) {
852 sas_ata_schedule_reset(dev); 861 sas_ata_schedule_reset(dev);
853 ret = TMF_RESP_FUNC_COMPLETE; 862 ret = TMF_RESP_FUNC_COMPLETE;
854 } else 863 } else
855 ret = isci_task_send_lu_reset_sas(isci_host, isci_device, lun); 864 ret = isci_task_send_lu_reset_sas(ihost, isci_device, lun);
856 865
857 /* If the LUN reset worked, all the I/O can now be terminated. */ 866 /* If the LUN reset worked, all the I/O can now be terminated. */
858 if (ret == TMF_RESP_FUNC_COMPLETE) 867 if (ret == TMF_RESP_FUNC_COMPLETE) {
859 /* Terminate all I/O now. */ 868 /* Terminate all I/O now. */
860 isci_terminate_pending_requests(isci_host, 869 isci_terminate_pending_requests(ihost, isci_device);
861 isci_device); 870 isci_remote_device_resume(ihost, isci_device, NULL, NULL);
862 871 }
863 out: 872 out:
864 isci_put_device(isci_device); 873 isci_put_device(isci_device);
865 return ret; 874 return ret;
@@ -976,7 +985,7 @@ int isci_task_abort_task(struct sas_task *task)
976 spin_unlock(&task->task_state_lock); 985 spin_unlock(&task->task_state_lock);
977 spin_unlock_irqrestore(&isci_host->scic_lock, flags); 986 spin_unlock_irqrestore(&isci_host->scic_lock, flags);
978 987
979 dev_dbg(&isci_host->pdev->dev, 988 dev_warn(&isci_host->pdev->dev,
980 "%s: dev = %p, task = %p, old_request == %p\n", 989 "%s: dev = %p, task = %p, old_request == %p\n",
981 __func__, isci_device, task, old_request); 990 __func__, isci_device, task, old_request);
982 991
@@ -998,7 +1007,7 @@ int isci_task_abort_task(struct sas_task *task)
998 1007
999 ret = TMF_RESP_FUNC_COMPLETE; 1008 ret = TMF_RESP_FUNC_COMPLETE;
1000 1009
1001 dev_dbg(&isci_host->pdev->dev, 1010 dev_warn(&isci_host->pdev->dev,
1002 "%s: abort task not needed for %p\n", 1011 "%s: abort task not needed for %p\n",
1003 __func__, task); 1012 __func__, task);
1004 goto out; 1013 goto out;
@@ -1022,7 +1031,7 @@ int isci_task_abort_task(struct sas_task *task)
1022 /* The request was already being handled by someone else (because 1031 /* The request was already being handled by someone else (because
1023 * they got to set the state away from started). 1032 * they got to set the state away from started).
1024 */ 1033 */
1025 dev_dbg(&isci_host->pdev->dev, 1034 dev_warn(&isci_host->pdev->dev,
1026 "%s: device = %p; old_request %p already being aborted\n", 1035 "%s: device = %p; old_request %p already being aborted\n",
1027 __func__, 1036 __func__,
1028 isci_device, old_request); 1037 isci_device, old_request);
@@ -1035,7 +1044,7 @@ int isci_task_abort_task(struct sas_task *task)
1035 1044
1036 spin_unlock_irqrestore(&isci_host->scic_lock, flags); 1045 spin_unlock_irqrestore(&isci_host->scic_lock, flags);
1037 1046
1038 dev_dbg(&isci_host->pdev->dev, 1047 dev_warn(&isci_host->pdev->dev,
1039 "%s: %s request" 1048 "%s: %s request"
1040 " or complete_in_target (%d), thus no TMF\n", 1049 " or complete_in_target (%d), thus no TMF\n",
1041 __func__, 1050 __func__,
@@ -1068,6 +1077,15 @@ int isci_task_abort_task(struct sas_task *task)
1068 */ 1077 */
1069 perform_termination = 1; 1078 perform_termination = 1;
1070 1079
1080 if (isci_device && !test_bit(IDEV_GONE, &isci_device->flags) &&
1081 (isci_remote_device_suspend(isci_host, isci_device)
1082 != SCI_SUCCESS)) {
1083 dev_warn(&isci_host->pdev->dev,
1084 "%s: device = %p; failed to suspend\n",
1085 __func__, isci_device);
1086 goto out;
1087 }
1088
1071 } else { 1089 } else {
1072 /* Fill in the tmf stucture */ 1090 /* Fill in the tmf stucture */
1073 isci_task_build_abort_task_tmf(&tmf, isci_tmf_ssp_task_abort, 1091 isci_task_build_abort_task_tmf(&tmf, isci_tmf_ssp_task_abort,
@@ -1076,6 +1094,14 @@ int isci_task_abort_task(struct sas_task *task)
1076 1094
1077 spin_unlock_irqrestore(&isci_host->scic_lock, flags); 1095 spin_unlock_irqrestore(&isci_host->scic_lock, flags);
1078 1096
1097 if (isci_remote_device_suspend(isci_host, isci_device)
1098 != SCI_SUCCESS) {
1099 dev_warn(&isci_host->pdev->dev,
1100 "%s: device = %p; failed to suspend\n",
1101 __func__, isci_device);
1102 goto out;
1103 }
1104
1079 #define ISCI_ABORT_TASK_TIMEOUT_MS 500 /* 1/2 second timeout */ 1105 #define ISCI_ABORT_TASK_TIMEOUT_MS 500 /* 1/2 second timeout */
1080 ret = isci_task_execute_tmf(isci_host, isci_device, &tmf, 1106 ret = isci_task_execute_tmf(isci_host, isci_device, &tmf,
1081 ISCI_ABORT_TASK_TIMEOUT_MS); 1107 ISCI_ABORT_TASK_TIMEOUT_MS);
@@ -1083,7 +1109,7 @@ int isci_task_abort_task(struct sas_task *task)
1083 if (ret == TMF_RESP_FUNC_COMPLETE) 1109 if (ret == TMF_RESP_FUNC_COMPLETE)
1084 perform_termination = 1; 1110 perform_termination = 1;
1085 else 1111 else
1086 dev_dbg(&isci_host->pdev->dev, 1112 dev_warn(&isci_host->pdev->dev,
1087 "%s: isci_task_send_tmf failed\n", __func__); 1113 "%s: isci_task_send_tmf failed\n", __func__);
1088 } 1114 }
1089 if (perform_termination) { 1115 if (perform_termination) {
@@ -1094,6 +1120,7 @@ int isci_task_abort_task(struct sas_task *task)
1094 */ 1120 */
1095 isci_terminate_request_core(isci_host, isci_device, 1121 isci_terminate_request_core(isci_host, isci_device,
1096 old_request); 1122 old_request);
1123 isci_remote_device_resume(isci_host, isci_device, NULL, NULL);
1097 } 1124 }
1098 1125
1099 /* Make sure we do not leave a reference to aborted_io_completion */ 1126 /* Make sure we do not leave a reference to aborted_io_completion */
@@ -1251,21 +1278,13 @@ static int isci_reset_device(struct isci_host *ihost,
1251 struct isci_remote_device *idev) 1278 struct isci_remote_device *idev)
1252{ 1279{
1253 int rc; 1280 int rc;
1254 unsigned long flags;
1255 enum sci_status status; 1281 enum sci_status status;
1256 struct sas_phy *phy = sas_get_local_phy(dev); 1282 struct sas_phy *phy = sas_get_local_phy(dev);
1257 struct isci_port *iport = dev->port->lldd_port; 1283 struct isci_port *iport = dev->port->lldd_port;
1258 1284
1259 dev_dbg(&ihost->pdev->dev, "%s: idev %p\n", __func__, idev); 1285 dev_dbg(&ihost->pdev->dev, "%s: idev %p\n", __func__, idev);
1260 1286
1261 spin_lock_irqsave(&ihost->scic_lock, flags); 1287 if (isci_remote_device_reset(ihost, idev) != SCI_SUCCESS) {
1262 status = sci_remote_device_reset(idev);
1263 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1264
1265 if (status != SCI_SUCCESS) {
1266 dev_dbg(&ihost->pdev->dev,
1267 "%s: sci_remote_device_reset(%p) returned %d!\n",
1268 __func__, idev, status);
1269 rc = TMF_RESP_FUNC_FAILED; 1288 rc = TMF_RESP_FUNC_FAILED;
1270 goto out; 1289 goto out;
1271 } 1290 }
@@ -1281,15 +1300,12 @@ static int isci_reset_device(struct isci_host *ihost,
1281 isci_remote_device_nuke_requests(ihost, idev); 1300 isci_remote_device_nuke_requests(ihost, idev);
1282 1301
1283 /* Since all pending TCs have been cleaned, resume the RNC. */ 1302 /* Since all pending TCs have been cleaned, resume the RNC. */
1284 spin_lock_irqsave(&ihost->scic_lock, flags); 1303 status = isci_remote_device_reset_complete(ihost, idev);
1285 status = sci_remote_device_reset_complete(idev);
1286 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1287 1304
1288 if (status != SCI_SUCCESS) { 1305 if (status != SCI_SUCCESS)
1289 dev_dbg(&ihost->pdev->dev, 1306 dev_dbg(&ihost->pdev->dev,
1290 "%s: sci_remote_device_reset_complete(%p) " 1307 "%s: isci_remote_device_reset_complete(%p) "
1291 "returned %d!\n", __func__, idev, status); 1308 "returned %d!\n", __func__, idev, status);
1292 }
1293 1309
1294 dev_dbg(&ihost->pdev->dev, "%s: idev %p complete.\n", __func__, idev); 1310 dev_dbg(&ihost->pdev->dev, "%s: idev %p complete.\n", __func__, idev);
1295 out: 1311 out:
@@ -1305,7 +1321,7 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev)
1305 int ret; 1321 int ret;
1306 1322
1307 spin_lock_irqsave(&ihost->scic_lock, flags); 1323 spin_lock_irqsave(&ihost->scic_lock, flags);
1308 idev = isci_lookup_device(dev); 1324 idev = isci_get_device(dev);
1309 spin_unlock_irqrestore(&ihost->scic_lock, flags); 1325 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1310 1326
1311 if (!idev) { 1327 if (!idev) {