aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptsas.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 8e77837c07ec..190bd940bb01 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -324,6 +324,7 @@ mptsas_slave_destroy(struct scsi_device *sdev)
324 struct sas_rphy *rphy; 324 struct sas_rphy *rphy;
325 struct mptsas_portinfo *p; 325 struct mptsas_portinfo *p;
326 int i; 326 int i;
327 VirtDevice *vdev;
327 328
328 /* 329 /*
329 * Handle hotplug removal case. 330 * Handle hotplug removal case.
@@ -347,8 +348,29 @@ mptsas_slave_destroy(struct scsi_device *sdev)
347 out: 348 out:
348 mutex_unlock(&hd->ioc->sas_topology_mutex); 349 mutex_unlock(&hd->ioc->sas_topology_mutex);
349 /* 350 /*
350 * TODO: Issue target reset to flush firmware outstanding commands. 351 * Issue target reset to flush firmware outstanding commands.
351 */ 352 */
353 vdev = sdev->hostdata;
354 if (vdev->configured_lun){
355 if (mptscsih_TMHandler(hd,
356 MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
357 vdev->bus_id,
358 vdev->target_id,
359 0, 0, 5 /* 5 second timeout */)
360 < 0){
361
362 /* The TM request failed!
363 * Fatal error case.
364 */
365 printk(MYIOC_s_WARN_FMT
366 "Error processing TaskMgmt id=%d TARGET_RESET\n",
367 hd->ioc->name,
368 vdev->target_id);
369
370 hd->tmPending = 0;
371 hd->tmState = TM_STATE_NONE;
372 }
373 }
352 mptscsih_slave_destroy(sdev); 374 mptscsih_slave_destroy(sdev);
353} 375}
354 376