From 76802ce6756d605fbd7a9a43c196e9a471b3e57c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 29 Jun 2011 09:45:48 -0700 Subject: 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 Acked-by: Jeff Skirvin Signed-off-by: Dan Williams --- drivers/scsi/isci/remote_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index a81a864d35c..71ab9081fe2 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 { struct scic_sds_controller *scic = sci_dev->owning_port->owning_controller; struct isci_host *ihost = scic_to_ihost(scic); - u32 i, request_count = sci_dev->started_request_count; enum sci_status status = SCI_SUCCESS; + u32 i; - for (i = 0; i < SCI_MAX_IO_REQUESTS && i < request_count; i++) { + for (i = 0; i < SCI_MAX_IO_REQUESTS; i++) { struct isci_request *ireq = ihost->reqs[i]; enum sci_status s; -- cgit v1.2.3-70-g09d2