aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_device.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-18 12:25:07 -0500
committerDan Williams <dan.j.williams@intel.com>2011-07-03 06:55:27 -0400
commit0cf89d1d27c1bdd0abf1714096f98ea44704dcff (patch)
tree0bee9fa05aba8a6e1fe4b6b50a3bfc6d0793356f /drivers/scsi/isci/remote_device.c
parentc7ef4031f01301298bbaba2666740183cd399f8c (diff)
isci: cleanup "starting" state handling
The lldd actively disallows requests in the "starting" state. Retrying or holding off commands in this state is sub-optimal: 1/ it adds another state check to the fast path 2/ retrying can cause libsas to give up However, isci's ->lldd_dev_found() routine already waits for controller start to complete before allowing further progress. Checking the "starting" state in isci_task_execute_task and the isr is redundant and misleading. Clean this up and introduce a controller-wide event queue to start reeling in "completion" proliferation in the driver. The "stopping" state cleanups are in a similar vein, rely on the the isr and other paths being precluded from occurring rather than implementing state checking logic. Reported-by: Christoph Hellwig <hch@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_device.c')
-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 dbf3c82f619..936f22957e5 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -507,6 +507,8 @@ int isci_remote_device_found(struct domain_device *domain_dev)
507 dev_dbg(&isci_host->pdev->dev, 507 dev_dbg(&isci_host->pdev->dev,
508 "%s: domain_device = %p\n", __func__, domain_dev); 508 "%s: domain_device = %p\n", __func__, domain_dev);
509 509
510 wait_for_start(isci_host);
511
510 sas_port = domain_dev->port; 512 sas_port = domain_dev->port;
511 sas_phy = list_first_entry(&sas_port->phy_list, struct asd_sas_phy, 513 sas_phy = list_first_entry(&sas_port->phy_list, struct asd_sas_phy,
512 port_phy_el); 514 port_phy_el);
@@ -560,8 +562,6 @@ int isci_remote_device_found(struct domain_device *domain_dev)
560 return -ENODEV; 562 return -ENODEV;
561 } 563 }
562 564
563 wait_for_completion(&isci_host->start_complete);
564
565 return 0; 565 return 0;
566} 566}
567/** 567/**