diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-01-04 02:26:08 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 16:05:05 -0500 |
commit | c132f692085ac624d7c8123df781846c8dcb3166 (patch) | |
tree | c9009fcb9112812544f54efc6c134021dffb6545 /drivers/scsi/isci/init.c | |
parent | cb48d672bfeb4147f3e20d5b16fa2eb6377231e2 (diff) |
[SCSI] isci: kill iphy->isci_port lookups
This field is a holdover from the OS abstraction conversion. The stable
phy to port lookups are done via iphy->ownining_port under scic_lock.
After this conversion to use port->lldd_port the only volatile lookup is
the initial lookup in isci_port_formed(). After that point any lookup
via a successfully notified domain_device is guaranteed to be valid
until the domain_device is destroyed.
Delete ->start_complete as it is only set once and is set as a
consequence of the port going link up, by definition of getting a port
formed event the port is "ready".
While we are correcting port lookups also move the asd_sas_port table
out from under the isci_port. This is to preclude any temptation to use
container_of() to convert an asd_sas_port to an isci_port, the
association is dynamic and under libsas control.
Tested-by: Maciej Trela <maciej.trela@intel.com>
[dmilburn@redhat.com: fix i686 compile error]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/init.c')
-rw-r--r-- | drivers/scsi/isci/init.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 7ba236e9fab2..c20fda090423 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c | |||
@@ -241,18 +241,13 @@ static int isci_register_sas_ha(struct isci_host *isci_host) | |||
241 | if (!sas_ports) | 241 | if (!sas_ports) |
242 | return -ENOMEM; | 242 | return -ENOMEM; |
243 | 243 | ||
244 | /*----------------- Libsas Initialization Stuff---------------------- | ||
245 | * Set various fields in the sas_ha struct: | ||
246 | */ | ||
247 | |||
248 | sas_ha->sas_ha_name = DRV_NAME; | 244 | sas_ha->sas_ha_name = DRV_NAME; |
249 | sas_ha->lldd_module = THIS_MODULE; | 245 | sas_ha->lldd_module = THIS_MODULE; |
250 | sas_ha->sas_addr = &isci_host->phys[0].sas_addr[0]; | 246 | sas_ha->sas_addr = &isci_host->phys[0].sas_addr[0]; |
251 | 247 | ||
252 | /* set the array of phy and port structs. */ | ||
253 | for (i = 0; i < SCI_MAX_PHYS; i++) { | 248 | for (i = 0; i < SCI_MAX_PHYS; i++) { |
254 | sas_phys[i] = &isci_host->phys[i].sas_phy; | 249 | sas_phys[i] = &isci_host->phys[i].sas_phy; |
255 | sas_ports[i] = &isci_host->ports[i].sas_port; | 250 | sas_ports[i] = &isci_host->sas_ports[i]; |
256 | } | 251 | } |
257 | 252 | ||
258 | sas_ha->sas_phy = sas_phys; | 253 | sas_ha->sas_phy = sas_phys; |