aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-09 01:41:57 -0500
committerDan Williams <dan.j.williams@intel.com>2012-05-17 17:33:39 -0400
commitd6b2a0e4a066ea51322e16e66b25028cb0b4ca7e (patch)
tree77fbde12b41062458824621916498f335c6eef11 /drivers/scsi/isci
parent033751f6643adf616b85ac5eea7ce784bdde1b50 (diff)
isci: Remove isci_device reqs_in_process and dev_node from isci_device.
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/init.c1
-rw-r--r--drivers/scsi/isci/remote_device.c6
-rw-r--r--drivers/scsi/isci/remote_device.h1
-rw-r--r--drivers/scsi/isci/request.c12
-rw-r--r--drivers/scsi/isci/request.h2
-rw-r--r--drivers/scsi/isci/task.c4
6 files changed, 1 insertions, 25 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 39f12703b893..f2a8a3346307 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -569,7 +569,6 @@ static struct isci_host *isci_host_alloc(struct pci_dev *pdev, int id)
569 for (i = 0; i < SCI_MAX_REMOTE_DEVICES; i++) { 569 for (i = 0; i < SCI_MAX_REMOTE_DEVICES; i++) {
570 struct isci_remote_device *idev = &ihost->devices[i]; 570 struct isci_remote_device *idev = &ihost->devices[i];
571 571
572 INIT_LIST_HEAD(&idev->reqs_in_process);
573 INIT_LIST_HEAD(&idev->node); 572 INIT_LIST_HEAD(&idev->node);
574 } 573 }
575 574
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index b26ab05107dd..b14eff3c76d0 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -919,7 +919,7 @@ static void isci_remote_device_deconstruct(struct isci_host *ihost, struct isci_
919 * here should go through isci_remote_device_nuke_requests. 919 * here should go through isci_remote_device_nuke_requests.
920 * If we hit this condition, we will need a way to complete 920 * If we hit this condition, we will need a way to complete
921 * io requests in process */ 921 * io requests in process */
922 BUG_ON(!list_empty(&idev->reqs_in_process)); 922 BUG_ON(idev->started_request_count > 0);
923 923
924 sci_remote_device_destruct(idev); 924 sci_remote_device_destruct(idev);
925 list_del_init(&idev->node); 925 list_del_init(&idev->node);
@@ -1345,10 +1345,6 @@ isci_remote_device_alloc(struct isci_host *ihost, struct isci_port *iport)
1345 dev_warn(&ihost->pdev->dev, "%s: failed\n", __func__); 1345 dev_warn(&ihost->pdev->dev, "%s: failed\n", __func__);
1346 return NULL; 1346 return NULL;
1347 } 1347 }
1348
1349 if (WARN_ONCE(!list_empty(&idev->reqs_in_process), "found requests in process\n"))
1350 return NULL;
1351
1352 if (WARN_ONCE(!list_empty(&idev->node), "found non-idle remote device\n")) 1348 if (WARN_ONCE(!list_empty(&idev->node), "found non-idle remote device\n"))
1353 return NULL; 1349 return NULL;
1354 1350
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index da43698e9eba..8b7817cf4352 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -90,7 +90,6 @@ struct isci_remote_device {
90 struct isci_port *isci_port; 90 struct isci_port *isci_port;
91 struct domain_device *domain_dev; 91 struct domain_device *domain_dev;
92 struct list_head node; 92 struct list_head node;
93 struct list_head reqs_in_process;
94 struct sci_base_state_machine sm; 93 struct sci_base_state_machine sm;
95 u32 device_port_width; 94 u32 device_port_width;
96 enum sas_linkrate connection_rate; 95 enum sas_linkrate connection_rate;
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index f4e80f31423c..662f36de8052 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -2956,9 +2956,6 @@ static void isci_request_io_request_complete(struct isci_host *ihost,
2956 /* Add to the completed list. */ 2956 /* Add to the completed list. */
2957 list_add(&request->completed_node, &ihost->requests_to_complete); 2957 list_add(&request->completed_node, &ihost->requests_to_complete);
2958 2958
2959 /* Take the request off the device's pending request list. */
2960 list_del_init(&request->dev_node);
2961
2962 /* complete the io request to the core. */ 2959 /* complete the io request to the core. */
2963 sci_controller_complete_io(ihost, request->target_device, request); 2960 sci_controller_complete_io(ihost, request->target_device, request);
2964 2961
@@ -3412,7 +3409,6 @@ static struct isci_request *isci_request_from_tag(struct isci_host *ihost, u16 t
3412 ireq->flags = 0; 3409 ireq->flags = 0;
3413 ireq->num_sg_entries = 0; 3410 ireq->num_sg_entries = 0;
3414 INIT_LIST_HEAD(&ireq->completed_node); 3411 INIT_LIST_HEAD(&ireq->completed_node);
3415 INIT_LIST_HEAD(&ireq->dev_node);
3416 3412
3417 return ireq; 3413 return ireq;
3418} 3414}
@@ -3496,17 +3492,9 @@ int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *ide
3496 spin_unlock_irqrestore(&ihost->scic_lock, flags); 3492 spin_unlock_irqrestore(&ihost->scic_lock, flags);
3497 return status; 3493 return status;
3498 } 3494 }
3499
3500 /* Either I/O started OK, or the core has signaled that 3495 /* Either I/O started OK, or the core has signaled that
3501 * the device needs a target reset. 3496 * the device needs a target reset.
3502 *
3503 * In either case, hold onto the I/O for later.
3504 *
3505 * Update it's status and add it to the list in the
3506 * remote device object.
3507 */ 3497 */
3508 list_add(&ireq->dev_node, &idev->reqs_in_process);
3509
3510 if (status != SCI_SUCCESS) { 3498 if (status != SCI_SUCCESS) {
3511 /* The request did not really start in the 3499 /* The request did not really start in the
3512 * hardware, so clear the request handle 3500 * hardware, so clear the request handle
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index f3116a51235f..d12e97531da8 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -96,8 +96,6 @@ struct isci_request {
96 struct isci_host *isci_host; 96 struct isci_host *isci_host;
97 /* For use in the requests_to_{complete|abort} lists: */ 97 /* For use in the requests_to_{complete|abort} lists: */
98 struct list_head completed_node; 98 struct list_head completed_node;
99 /* For use in the reqs_in_process list: */
100 struct list_head dev_node;
101 dma_addr_t request_daddr; 99 dma_addr_t request_daddr;
102 dma_addr_t zero_scatter_daddr; 100 dma_addr_t zero_scatter_daddr;
103 unsigned int num_sg_entries; 101 unsigned int num_sg_entries;
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 9d8720d6266c..222fb0de4d59 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -317,9 +317,6 @@ static int isci_task_execute_tmf(struct isci_host *ihost,
317 spin_unlock_irqrestore(&ihost->scic_lock, flags); 317 spin_unlock_irqrestore(&ihost->scic_lock, flags);
318 goto err_tci; 318 goto err_tci;
319 } 319 }
320 /* add the request to the remote device request list. */
321 list_add(&ireq->dev_node, &idev->reqs_in_process);
322
323 /* The RNC must be unsuspended before the TMF can get a response. */ 320 /* The RNC must be unsuspended before the TMF can get a response. */
324 sci_remote_device_resume(idev, NULL, NULL); 321 sci_remote_device_resume(idev, NULL, NULL);
325 322
@@ -721,7 +718,6 @@ isci_task_request_complete(struct isci_host *ihost,
721 set_bit(IREQ_TERMINATED, &ireq->flags); 718 set_bit(IREQ_TERMINATED, &ireq->flags);
722 719
723 isci_free_tag(ihost, ireq->io_tag); 720 isci_free_tag(ihost, ireq->io_tag);
724 list_del_init(&ireq->dev_node);
725 721
726 /* The task management part completes last. */ 722 /* The task management part completes last. */
727 if (tmf_complete) 723 if (tmf_complete)