summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-11 10:43:57 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:31 -0700
commit4711ba10b13891edf228944a9d0a21dfe7fe90f0 (patch)
treec846eb029eb2bc827a614df963b00aa412b95956 /drivers/scsi/isci/host.c
parent2e8320f751030a12efc3e64ee857bfa4647f81fe (diff)
isci: fix oem parameter initialization and mode detection
1/ Since commit 858d4aa7 "isci: Move firmware loading to per PCI device" we have been silently falling back to built-in defaults for the parameter settings by skipping the call to scic_oem_parameters_set(). 2/ The afe parameters from the firmware were not being honored 3/ The latest oem parameter definition flips the mode_type values which are now 0: for APC 1: for MPC. For APC we need to make sure all the phys default to the same address otherwise strict_wide_ports will cause duplicate domains. 4/ Fix up the driver announcement to indicate the source of the parameters. 5/ Fix up the sas addresses to be unique per controller (in the fallback case) Signed-off-by: Dave Jiang <dave.jiang@intel.com> 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.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index bb5b54d361b..d6e2a73e797 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -418,7 +418,7 @@ int isci_host_init(struct isci_host *isci_host)
int err = 0, i;
enum sci_status status;
struct scic_sds_controller *controller;
- union scic_oem_parameters scic_oem_params;
+ union scic_oem_parameters oem;
union scic_user_parameters scic_user_params;
struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev);
@@ -435,6 +435,7 @@ int isci_host_init(struct isci_host *isci_host)
}
isci_host->core_controller = controller;
+ sci_object_set_association(isci_host->core_controller, isci_host);
spin_lock_init(&isci_host->state_lock);
spin_lock_init(&isci_host->scic_lock);
spin_lock_init(&isci_host->queue_lock);
@@ -457,12 +458,6 @@ int isci_host_init(struct isci_host *isci_host)
isci_host->sas_ha.dev = &isci_host->pdev->dev;
isci_host->sas_ha.lldd_ha = isci_host;
- /*----------- SCIC controller Initialization Stuff ------------------
- * set association host adapter struct in core controller.
- */
- sci_object_set_association(isci_host->core_controller,
- (void *)isci_host);
-
/*
* grab initial values stored in the controller object for OEM and USER
* parameters
@@ -477,11 +472,11 @@ int isci_host_init(struct isci_host *isci_host)
return -ENODEV;
}
- scic_oem_parameters_get(controller, &scic_oem_params);
+ scic_oem_parameters_get(controller, &oem);
/* grab any OEM parameters specified in orom */
if (pci_info->orom) {
- status = isci_parse_oem_parameters(&scic_oem_params,
+ status = isci_parse_oem_parameters(&oem,
pci_info->orom,
isci_host->id);
if (status != SCI_SUCCESS) {
@@ -489,15 +484,14 @@ int isci_host_init(struct isci_host *isci_host)
"parsing firmware oem parameters failed\n");
return -EINVAL;
}
- } else {
- status = scic_oem_parameters_set(isci_host->core_controller,
- &scic_oem_params);
- if (status != SCI_SUCCESS) {
- dev_warn(&isci_host->pdev->dev,
- "%s: scic_oem_parameters_set failed\n",
- __func__);
- return -ENODEV;
- }
+ }
+
+ status = scic_oem_parameters_set(isci_host->core_controller, &oem);
+ if (status != SCI_SUCCESS) {
+ dev_warn(&isci_host->pdev->dev,
+ "%s: scic_oem_parameters_set failed\n",
+ __func__);
+ return -ENODEV;
}
tasklet_init(&isci_host->completion_tasklet,