diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-10-27 18:05:27 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-31 05:20:28 -0400 |
commit | 5412e25c55fc0b08041a451d8bee6f2b291099c2 (patch) | |
tree | 2dbaa34c32c376f4a683338fceba0a78b5c3d00c /drivers/scsi | |
parent | 3b34c169f8197e02529fa3ec703703c2ce418c57 (diff) |
[SCSI] isci: No need to manage the pending reset bit on pending requests.
The lldd does not need to look at or manage the pending device
reset bit in pending sas_tasks.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 35 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.h | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/task.c | 3 |
3 files changed, 1 insertions, 40 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index 9d9e33d2ed51..b207cd3b15a0 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -1438,38 +1438,3 @@ int isci_remote_device_found(struct domain_device *domain_dev) | |||
1438 | 1438 | ||
1439 | return status == SCI_SUCCESS ? 0 : -ENODEV; | 1439 | return status == SCI_SUCCESS ? 0 : -ENODEV; |
1440 | } | 1440 | } |
1441 | |||
1442 | /** | ||
1443 | * isci_device_clear_reset_pending() - This function will clear if any pending | ||
1444 | * reset condition flags on the device. | ||
1445 | * @request: This parameter is the isci_device object. | ||
1446 | * | ||
1447 | * true if there is a reset pending for the device. | ||
1448 | */ | ||
1449 | void isci_device_clear_reset_pending(struct isci_host *ihost, struct isci_remote_device *idev) | ||
1450 | { | ||
1451 | struct isci_request *isci_request; | ||
1452 | struct isci_request *tmp_req; | ||
1453 | unsigned long flags = 0; | ||
1454 | |||
1455 | dev_dbg(&ihost->pdev->dev, "%s: idev=%p, ihost=%p\n", | ||
1456 | __func__, idev, ihost); | ||
1457 | |||
1458 | spin_lock_irqsave(&ihost->scic_lock, flags); | ||
1459 | |||
1460 | /* Clear reset pending on all pending requests. */ | ||
1461 | list_for_each_entry_safe(isci_request, tmp_req, | ||
1462 | &idev->reqs_in_process, dev_node) { | ||
1463 | dev_dbg(&ihost->pdev->dev, "%s: idev = %p request = %p\n", | ||
1464 | __func__, idev, isci_request); | ||
1465 | |||
1466 | if (!test_bit(IREQ_TMF, &isci_request->flags)) { | ||
1467 | struct sas_task *task = isci_request_access_task(isci_request); | ||
1468 | |||
1469 | spin_lock(&task->task_state_lock); | ||
1470 | task->task_state_flags &= ~SAS_TASK_NEED_DEV_RESET; | ||
1471 | spin_unlock(&task->task_state_lock); | ||
1472 | } | ||
1473 | } | ||
1474 | spin_unlock_irqrestore(&ihost->scic_lock, flags); | ||
1475 | } | ||
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h index bee6dd2d0fe7..483ee50152f3 100644 --- a/drivers/scsi/isci/remote_device.h +++ b/drivers/scsi/isci/remote_device.h | |||
@@ -132,8 +132,7 @@ void isci_remote_device_nuke_requests(struct isci_host *ihost, | |||
132 | struct isci_remote_device *idev); | 132 | struct isci_remote_device *idev); |
133 | void isci_remote_device_gone(struct domain_device *domain_dev); | 133 | void isci_remote_device_gone(struct domain_device *domain_dev); |
134 | int isci_remote_device_found(struct domain_device *domain_dev); | 134 | int isci_remote_device_found(struct domain_device *domain_dev); |
135 | void isci_device_clear_reset_pending(struct isci_host *ihost, | 135 | |
136 | struct isci_remote_device *idev); | ||
137 | /** | 136 | /** |
138 | * sci_remote_device_stop() - This method will stop both transmission and | 137 | * sci_remote_device_stop() - This method will stop both transmission and |
139 | * reception of link activity for the supplied remote device. This method | 138 | * reception of link activity for the supplied remote device. This method |
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 80e1a69ac96f..6d8ff15a03d1 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -1570,9 +1570,6 @@ static int isci_reset_device(struct isci_host *ihost, | |||
1570 | } | 1570 | } |
1571 | spin_unlock_irqrestore(&ihost->scic_lock, flags); | 1571 | spin_unlock_irqrestore(&ihost->scic_lock, flags); |
1572 | 1572 | ||
1573 | /* Make sure all pending requests are able to be fully terminated. */ | ||
1574 | isci_device_clear_reset_pending(ihost, idev); | ||
1575 | |||
1576 | /* If this is a device on an expander, disable BCN processing. */ | 1573 | /* If this is a device on an expander, disable BCN processing. */ |
1577 | if (!scsi_is_sas_phy_local(phy)) | 1574 | if (!scsi_is_sas_phy_local(phy)) |
1578 | set_bit(IPORT_BCN_BLOCKED, &iport->flags); | 1575 | set_bit(IPORT_BCN_BLOCKED, &iport->flags); |