aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/host.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-08 09:52:49 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:30 -0700
commitd044af17aacd03a1f4fced1af4b7570d205c8fd9 (patch)
tree1304fd0c7fa979fb229a4bf57771e9e6cde7b37d /drivers/scsi/isci/host.c
parent9affa289e2f9ef4721e85edbde86466524bfe957 (diff)
isci: Add support for probing OROM for OEM params
We need to scan the OROM for signature and grab the OEM parameters. We also need to do the same for EFI. If all fails then we resort to user binary blob, and if that fails then we go to the defaults. Share the format with the create_fw utility so that all possible sources of the parameters are in-sync. 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.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index dc231c22ea93..bb5b54d361b0 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -61,6 +61,7 @@
#include "port.h"
#include "request.h"
#include "host.h"
+#include "probe_roms.h"
irqreturn_t isci_msix_isr(int vec, void *data)
{
@@ -419,6 +420,7 @@ int isci_host_init(struct isci_host *isci_host)
struct scic_sds_controller *controller;
union scic_oem_parameters scic_oem_params;
union scic_user_parameters scic_user_params;
+ struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev);
isci_timer_list_construct(isci_host);
@@ -461,31 +463,32 @@ int isci_host_init(struct isci_host *isci_host)
sci_object_set_association(isci_host->core_controller,
(void *)isci_host);
- /* grab initial values stored in the controller object for OEM and USER
- * parameters */
- scic_oem_parameters_get(controller, &scic_oem_params);
+ /*
+ * grab initial values stored in the controller object for OEM and USER
+ * parameters
+ */
scic_user_parameters_get(controller, &scic_user_params);
+ status = scic_user_parameters_set(isci_host->core_controller,
+ &scic_user_params);
+ if (status != SCI_SUCCESS) {
+ dev_warn(&isci_host->pdev->dev,
+ "%s: scic_user_parameters_set failed\n",
+ __func__);
+ return -ENODEV;
+ }
+
+ scic_oem_parameters_get(controller, &scic_oem_params);
- if (isci_firmware) {
- /* grab any OEM and USER parameters specified in binary blob */
+ /* grab any OEM parameters specified in orom */
+ if (pci_info->orom) {
status = isci_parse_oem_parameters(&scic_oem_params,
- isci_host->id,
- isci_firmware);
+ pci_info->orom,
+ isci_host->id);
if (status != SCI_SUCCESS) {
dev_warn(&isci_host->pdev->dev,
"parsing firmware oem parameters failed\n");
return -EINVAL;
}
-
- status = isci_parse_user_parameters(&scic_user_params,
- isci_host->id,
- isci_firmware);
- if (status != SCI_SUCCESS) {
- dev_warn(&isci_host->pdev->dev,
- "%s: isci_parse_user_parameters"
- " failed\n", __func__);
- return -EINVAL;
- }
} else {
status = scic_oem_parameters_set(isci_host->core_controller,
&scic_oem_params);
@@ -495,16 +498,6 @@ int isci_host_init(struct isci_host *isci_host)
__func__);
return -ENODEV;
}
-
-
- status = scic_user_parameters_set(isci_host->core_controller,
- &scic_user_params);
- if (status != SCI_SUCCESS) {
- dev_warn(&isci_host->pdev->dev,
- "%s: scic_user_parameters_set failed\n",
- __func__);
- return -ENODEV;
- }
}
tasklet_init(&isci_host->completion_tasklet,