diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 53 |
1 files changed, 47 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 9ad4d0968e5c..f6368a1d3021 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -3562,6 +3562,9 @@ qla24xx_reset_adapter(scsi_qla_host_t *vha) | |||
3562 | WRT_REG_DWORD(®->hccr, HCCRX_REL_RISC_PAUSE); | 3562 | WRT_REG_DWORD(®->hccr, HCCRX_REL_RISC_PAUSE); |
3563 | RD_REG_DWORD(®->hccr); | 3563 | RD_REG_DWORD(®->hccr); |
3564 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3564 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3565 | |||
3566 | if (IS_NOPOLLING_TYPE(ha)) | ||
3567 | ha->isp_ops->enable_intrs(ha); | ||
3565 | } | 3568 | } |
3566 | 3569 | ||
3567 | /* On sparc systems, obtain port and node WWN from firmware | 3570 | /* On sparc systems, obtain port and node WWN from firmware |
@@ -3847,6 +3850,10 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
3847 | uint32_t i; | 3850 | uint32_t i; |
3848 | struct qla_hw_data *ha = vha->hw; | 3851 | struct qla_hw_data *ha = vha->hw; |
3849 | 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 | |||
3850 | rval = QLA_SUCCESS; | 3857 | rval = QLA_SUCCESS; |
3851 | 3858 | ||
3852 | segments = FA_RISC_CODE_SEGMENTS; | 3859 | segments = FA_RISC_CODE_SEGMENTS; |
@@ -4022,8 +4029,8 @@ fail_fw_integrity: | |||
4022 | return QLA_FUNCTION_FAILED; | 4029 | return QLA_FUNCTION_FAILED; |
4023 | } | 4030 | } |
4024 | 4031 | ||
4025 | int | 4032 | static int |
4026 | qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) | 4033 | qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) |
4027 | { | 4034 | { |
4028 | int rval; | 4035 | int rval; |
4029 | int segments, fragment; | 4036 | int segments, fragment; |
@@ -4043,12 +4050,12 @@ qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
4043 | qla_printk(KERN_ERR, ha, "Firmware images can be retrieved " | 4050 | qla_printk(KERN_ERR, ha, "Firmware images can be retrieved " |
4044 | "from: " QLA_FW_URL ".\n"); | 4051 | "from: " QLA_FW_URL ".\n"); |
4045 | 4052 | ||
4046 | /* Try to load RISC code from flash. */ | 4053 | return QLA_FUNCTION_FAILED; |
4047 | qla_printk(KERN_ERR, ha, "Attempting to load (potentially " | ||
4048 | "outdated) firmware from flash.\n"); | ||
4049 | return qla24xx_load_risc_flash(vha, srisc_addr); | ||
4050 | } | 4054 | } |
4051 | 4055 | ||
4056 | qla_printk(KERN_INFO, ha, | ||
4057 | "FW: Loading via request-firmware...\n"); | ||
4058 | |||
4052 | rval = QLA_SUCCESS; | 4059 | rval = QLA_SUCCESS; |
4053 | 4060 | ||
4054 | segments = FA_RISC_CODE_SEGMENTS; | 4061 | segments = FA_RISC_CODE_SEGMENTS; |
@@ -4133,6 +4140,40 @@ fail_fw_integrity: | |||
4133 | return QLA_FUNCTION_FAILED; | 4140 | return QLA_FUNCTION_FAILED; |
4134 | } | 4141 | } |
4135 | 4142 | ||
4143 | int | ||
4144 | qla24xx_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 | |||
4160 | int | ||
4161 | qla81xx_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 | |||
4136 | void | 4177 | void |
4137 | qla2x00_try_to_stop_firmware(scsi_qla_host_t *vha) | 4178 | qla2x00_try_to_stop_firmware(scsi_qla_host_t *vha) |
4138 | { | 4179 | { |