aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdmund Nadolski <edmund.nadolski@intel.com>2011-02-18 12:25:09 -0500
committerDan Williams <dan.j.williams@intel.com>2011-07-03 06:55:27 -0400
commit77950f51f5299c1b4f4fa4a19974128da720d199 (patch)
tree4616a16bf4d2fe05826800274941af4c3c8df242
parent0cf89d1d27c1bdd0abf1714096f98ea44704dcff (diff)
isci: enable interrupts during controller start, and flush discovery
Polling the event queue during scan is an unneeded holdover from the original driver. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> [djbw: ensure we flush all port events and domain discovery] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/host.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index dbdc3bab9ca3..7f351a35e87b 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -113,32 +113,18 @@ int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time)
113{ 113{
114 struct isci_host *ihost = isci_host_from_sas_ha(SHOST_TO_SAS_HA(shost)); 114 struct isci_host *ihost = isci_host_from_sas_ha(SHOST_TO_SAS_HA(shost));
115 115
116 /** 116 if (test_bit(IHOST_START_PENDING, &ihost->flags))
117 * check interrupt_handler's status and call completion_handler if true,
118 * link_up events should be coming from the scu core lib, as phy's come
119 * online. for each link_up from the core, call
120 * get_received_identify_address_frame, copy the frame into the
121 * sas_phy object and call libsas notify_port_event(PORTE_BYTES_DMAED).
122 * continue to return zero from thee scan_finished routine until
123 * the scic_cb_controller_start_complete() call comes from the core.
124 **/
125 if (scic_sds_controller_isr(ihost->core_controller))
126 scic_sds_controller_completion_handler(ihost->core_controller);
127
128 if (test_bit(IHOST_START_PENDING, &ihost->flags) && time < HZ*10) {
129 dev_dbg(&ihost->pdev->dev,
130 "%s: ihost->status = %d, time = %ld\n",
131 __func__, isci_host_get_state(ihost), time);
132 return 0; 117 return 0;
133 }
134 118
119 /* todo: use sas_flush_discovery once it is upstream */
120 scsi_flush_work(shost);
121
122 scsi_flush_work(shost);
135 123
136 dev_dbg(&ihost->pdev->dev, 124 dev_dbg(&ihost->pdev->dev,
137 "%s: ihost->status = %d, time = %ld\n", 125 "%s: ihost->status = %d, time = %ld\n",
138 __func__, isci_host_get_state(ihost), time); 126 __func__, isci_host_get_state(ihost), time);
139 127
140 scic_controller_enable_interrupts(ihost->core_controller);
141
142 return 1; 128 return 1;
143 129
144} 130}
@@ -150,8 +136,11 @@ void isci_host_scan_start(struct Scsi_Host *shost)
150 unsigned long tmo = scic_controller_get_suggested_start_timeout(scic); 136 unsigned long tmo = scic_controller_get_suggested_start_timeout(scic);
151 137
152 set_bit(IHOST_START_PENDING, &ihost->flags); 138 set_bit(IHOST_START_PENDING, &ihost->flags);
153 scic_controller_disable_interrupts(ihost->core_controller); 139
140 spin_lock_irq(&ihost->scic_lock);
154 scic_controller_start(scic, tmo); 141 scic_controller_start(scic, tmo);
142 scic_controller_enable_interrupts(scic);
143 spin_unlock_irq(&ihost->scic_lock);
155} 144}
156 145
157void isci_host_stop_complete(struct isci_host *ihost, enum sci_status completion_status) 146void isci_host_stop_complete(struct isci_host *ihost, enum sci_status completion_status)