aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-29 12:45:48 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:52 -0400
commit76802ce6756d605fbd7a9a43c196e9a471b3e57c (patch)
tree8fd454bc49a4352050aa76f797197a5271ac0d82 /drivers/scsi
parent852809559e4680ba4768262a6c3d21454fcd460e (diff)
isci: fix scic_sds_remote_device_terminate_requests
Commit 0815632 "isci: unify remote_device stop_handlers" introduced the possibility that not all requests get terminated if we reach the request_count. Now that we properly reference count devices we don't need this self-defense and can do the straightforward scan of all active requests. Reported-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Acked-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/isci/remote_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index a81a864d35c4..71ab9081fe24 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -137,10 +137,10 @@ static enum sci_status scic_sds_remote_device_terminate_requests(struct scic_sds
137{ 137{
138 struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller; 138 struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller;
139 struct isci_host *ihost = scic_to_ihost(scic); 139 struct isci_host *ihost = scic_to_ihost(scic);
140 u32 i, request_count = sci_dev->started_request_count;
141 enum sci_status status = SCI_SUCCESS; 140 enum sci_status status = SCI_SUCCESS;
141 u32 i;
142 142
143 for (i = 0; i < SCI_MAX_IO_REQUESTS && i < request_count; i++) { 143 for (i = 0; i < SCI_MAX_IO_REQUESTS; i++) {
144 struct isci_request *ireq = ihost->reqs[i]; 144 struct isci_request *ireq = ihost->reqs[i];
145 enum sci_status s; 145 enum sci_status s;
146 146