From 4711ba10b13891edf228944a9d0a21dfe7fe90f0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 11 Mar 2011 10:43:57 -0800 Subject: 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 Signed-off-by: Dan Williams --- drivers/scsi/isci/firmware/create_fw.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/isci/firmware/create_fw.c') diff --git a/drivers/scsi/isci/firmware/create_fw.c b/drivers/scsi/isci/firmware/create_fw.c index f8f96d6eb7df..c7a2887a7e95 100644 --- a/drivers/scsi/isci/firmware/create_fw.c +++ b/drivers/scsi/isci/firmware/create_fw.c @@ -44,7 +44,7 @@ void set_binary_values(struct isci_orom *isci_orom) /* setting OROM signature */ strncpy(isci_orom->hdr.signature, sig, strlen(sig)); - isci_orom->hdr.version = 0x10; + isci_orom->hdr.version = version; isci_orom->hdr.total_block_length = sizeof(struct isci_orom); isci_orom->hdr.hdr_length = sizeof(struct sci_bios_oem_param_block_hdr); isci_orom->hdr.num_elements = num_elements; @@ -65,6 +65,15 @@ void set_binary_values(struct isci_orom *isci_orom) (__u32)(sas_addr[ctrl_idx][phy_idx] >> 32); isci_orom->ctrl[ctrl_idx].phys[phy_idx].sas_address.low = (__u32)(sas_addr[ctrl_idx][phy_idx]); + + isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control0 = + afe_tx_amp_control0; + isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control1 = + afe_tx_amp_control1; + isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control2 = + afe_tx_amp_control2; + isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control3 = + afe_tx_amp_control3; } } } -- cgit v1.2.3