diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-03-31 16:10:44 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:00:36 -0400 |
commit | 4393aa4e6b9517a666f0ef6b774fd421a9dc4c68 (patch) | |
tree | ec5e0c222d16f2368e5589a11fc4ec191ceca365 /drivers/scsi/isci/host.c | |
parent | 037afc7812e2b202fbc18218e6c0eff34dad36ed (diff) |
isci: fix fragile/conditional isci_host lookups
A domain_device can always reference back to ->lldd_ha unlike local lldd
structures. Fix up cases where the driver uses local objects to look up the
isci_host. This also changes the calling conventions of some routines to
expect a valid isci_host parameter rather than re-lookup the pointer on entry.
Incidentally cleans up some macros that are longer to type than the open-coded
equivalent:
isci_host_from_sas_ha
isci_dev_from_domain_dev
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r-- | drivers/scsi/isci/host.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 79515be5f7c1..66449593aa8c 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -129,7 +129,7 @@ void isci_host_start_complete(struct isci_host *ihost, enum sci_status completio | |||
129 | 129 | ||
130 | int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) | 130 | int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) |
131 | { | 131 | { |
132 | struct isci_host *ihost = isci_host_from_sas_ha(SHOST_TO_SAS_HA(shost)); | 132 | struct isci_host *ihost = SHOST_TO_SAS_HA(shost)->lldd_ha; |
133 | 133 | ||
134 | if (test_bit(IHOST_START_PENDING, &ihost->flags)) | 134 | if (test_bit(IHOST_START_PENDING, &ihost->flags)) |
135 | return 0; | 135 | return 0; |
@@ -149,7 +149,7 @@ int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
149 | 149 | ||
150 | void isci_host_scan_start(struct Scsi_Host *shost) | 150 | void isci_host_scan_start(struct Scsi_Host *shost) |
151 | { | 151 | { |
152 | struct isci_host *ihost = isci_host_from_sas_ha(SHOST_TO_SAS_HA(shost)); | 152 | struct isci_host *ihost = SHOST_TO_SAS_HA(shost)->lldd_ha; |
153 | struct scic_sds_controller *scic = ihost->core_controller; | 153 | struct scic_sds_controller *scic = ihost->core_controller; |
154 | unsigned long tmo = scic_controller_get_suggested_start_timeout(scic); | 154 | unsigned long tmo = scic_controller_get_suggested_start_timeout(scic); |
155 | 155 | ||