aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-01-22 12:45:32 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-25 08:57:08 -0500
commiteaac30be268b90e9288b3945fb5cc9ee8c5397c0 (patch)
treeb332dc070c3b14040dfb4d0c233890d4f667167f /drivers/scsi/qla2xxx
parent8eca3f39c4b11320787f7b216f63214aee8415a9 (diff)
[SCSI] qla2xxx: Modify firmware-load order precedence for ISP81XX parts.
Pre-ISP81XX parts (including ISP24xx and ISP25xx) could contain a firmware image within a segment of flash, driver would fallback to loading this firmware if the request-firmware interface failed (userspace .bin file). Moving forward, all ISP81XX parts will ship with a suggested-to-be-used firmware image within flash which all driver should first attempt to load. If the flash firmware load fails, the driver will then fallback to loading firmware via the request-firmware interface (ql8100_fw.bin). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c50
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
3 files changed, 46 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index ba4913353752..a336b4bc81a7 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -34,6 +34,7 @@ extern void qla24xx_update_fw_options(scsi_qla_host_t *);
34extern void qla81xx_update_fw_options(scsi_qla_host_t *); 34extern void qla81xx_update_fw_options(scsi_qla_host_t *);
35extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *); 35extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
36extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *); 36extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *);
37extern int qla81xx_load_risc(scsi_qla_host_t *, uint32_t *);
37 38
38extern int qla2x00_loop_resync(scsi_qla_host_t *); 39extern int qla2x00_loop_resync(scsi_qla_host_t *);
39 40
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index da9700fbc470..f6368a1d3021 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3850,6 +3850,10 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr)
3850 uint32_t i; 3850 uint32_t i;
3851 struct qla_hw_data *ha = vha->hw; 3851 struct qla_hw_data *ha = vha->hw;
3852 struct req_que *req = ha->req_q_map[0]; 3852 struct req_que *req = ha->req_q_map[0];
3853
3854 qla_printk(KERN_INFO, ha,
3855 "FW: Loading from flash (%x)...\n", ha->flt_region_fw);
3856
3853 rval = QLA_SUCCESS; 3857 rval = QLA_SUCCESS;
3854 3858
3855 segments = FA_RISC_CODE_SEGMENTS; 3859 segments = FA_RISC_CODE_SEGMENTS;
@@ -4025,8 +4029,8 @@ fail_fw_integrity:
4025 return QLA_FUNCTION_FAILED; 4029 return QLA_FUNCTION_FAILED;
4026} 4030}
4027 4031
4028int 4032static int
4029qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) 4033qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
4030{ 4034{
4031 int rval; 4035 int rval;
4032 int segments, fragment; 4036 int segments, fragment;
@@ -4046,12 +4050,12 @@ qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr)
4046 qla_printk(KERN_ERR, ha, "Firmware images can be retrieved " 4050 qla_printk(KERN_ERR, ha, "Firmware images can be retrieved "
4047 "from: " QLA_FW_URL ".\n"); 4051 "from: " QLA_FW_URL ".\n");
4048 4052
4049 /* Try to load RISC code from flash. */ 4053 return QLA_FUNCTION_FAILED;
4050 qla_printk(KERN_ERR, ha, "Attempting to load (potentially "
4051 "outdated) firmware from flash.\n");
4052 return qla24xx_load_risc_flash(vha, srisc_addr);
4053 } 4054 }
4054 4055
4056 qla_printk(KERN_INFO, ha,
4057 "FW: Loading via request-firmware...\n");
4058
4055 rval = QLA_SUCCESS; 4059 rval = QLA_SUCCESS;
4056 4060
4057 segments = FA_RISC_CODE_SEGMENTS; 4061 segments = FA_RISC_CODE_SEGMENTS;
@@ -4136,6 +4140,40 @@ fail_fw_integrity:
4136 return QLA_FUNCTION_FAILED; 4140 return QLA_FUNCTION_FAILED;
4137} 4141}
4138 4142
4143int
4144qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr)
4145{
4146 int rval;
4147
4148 /*
4149 * FW Load priority:
4150 * 1) Firmware via request-firmware interface (.bin file).
4151 * 2) Firmware residing in flash.
4152 */
4153 rval = qla24xx_load_risc_blob(vha, srisc_addr);
4154 if (rval == QLA_SUCCESS)
4155 return rval;
4156
4157 return qla24xx_load_risc_flash(vha, srisc_addr);
4158}
4159
4160int
4161qla81xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr)
4162{
4163 int rval;
4164
4165 /*
4166 * FW Load priority:
4167 * 1) Firmware residing in flash.
4168 * 2) Firmware via request-firmware interface (.bin file).
4169 */
4170 rval = qla24xx_load_risc_flash(vha, srisc_addr);
4171 if (rval == QLA_SUCCESS)
4172 return rval;
4173
4174 return qla24xx_load_risc_blob(vha, srisc_addr);
4175}
4176
4139void 4177void
4140qla2x00_try_to_stop_firmware(scsi_qla_host_t *vha) 4178qla2x00_try_to_stop_firmware(scsi_qla_host_t *vha)
4141{ 4179{
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 185ea8bcb9e2..cbf377fddbd3 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1480,7 +1480,7 @@ static struct isp_operations qla81xx_isp_ops = {
1480 .reset_adapter = qla24xx_reset_adapter, 1480 .reset_adapter = qla24xx_reset_adapter,
1481 .nvram_config = qla81xx_nvram_config, 1481 .nvram_config = qla81xx_nvram_config,
1482 .update_fw_options = qla81xx_update_fw_options, 1482 .update_fw_options = qla81xx_update_fw_options,
1483 .load_risc = qla24xx_load_risc, 1483 .load_risc = qla81xx_load_risc,
1484 .pci_info_str = qla24xx_pci_info_str, 1484 .pci_info_str = qla24xx_pci_info_str,
1485 .fw_version_str = qla24xx_fw_version_str, 1485 .fw_version_str = qla24xx_fw_version_str,
1486 .intr_handler = qla24xx_intr_handler, 1486 .intr_handler = qla24xx_intr_handler,