Commit d0c3eefa authored by Lalit Chandivade's avatar Lalit Chandivade Committed by James Bottomley

[SCSI] qla2xxx: Remove implicit ISP-abort after a flash update.

For ISP24xx and above the ISP-abort after flash update is not
needed, as the only purpose it was serving was to update the boot
code and firmware versions in the scsi_qla_host_t structure.  Now
an update of the versions will be done in the write-vpd path.
Signed-off-by: default avatarLalit Chandivade <lalit.chandivade@qlogic.com>
Additional cleanups and
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 6e181be5
...@@ -391,6 +391,7 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj, ...@@ -391,6 +391,7 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj,
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj,
struct device, kobj))); struct device, kobj)));
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
uint8_t *tmp_data;
if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size) if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size)
return 0; return 0;
...@@ -405,6 +406,19 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj, ...@@ -405,6 +406,19 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj,
ha->isp_ops->write_nvram(vha, (uint8_t *)buf, ha->vpd_base, count); ha->isp_ops->write_nvram(vha, (uint8_t *)buf, ha->vpd_base, count);
ha->isp_ops->read_nvram(vha, (uint8_t *)ha->vpd, ha->vpd_base, count); ha->isp_ops->read_nvram(vha, (uint8_t *)ha->vpd, ha->vpd_base, count);
/* Update flash version information for 4Gb & above. */
if (!IS_FWI2_CAPABLE(ha))
goto done;
tmp_data = vmalloc(256);
if (!tmp_data) {
qla_printk(KERN_WARNING, ha,
"Unable to allocate memory for VPD information update.\n");
goto done;
}
ha->isp_ops->get_flash_version(vha, tmp_data);
vfree(tmp_data);
done:
return count; return count;
} }
......
...@@ -2240,11 +2240,7 @@ qla24xx_write_optrom_data(struct scsi_qla_host *vha, uint8_t *buf, ...@@ -2240,11 +2240,7 @@ qla24xx_write_optrom_data(struct scsi_qla_host *vha, uint8_t *buf,
rval = qla24xx_write_flash_data(vha, (uint32_t *)buf, offset >> 2, rval = qla24xx_write_flash_data(vha, (uint32_t *)buf, offset >> 2,
length >> 2); length >> 2);
/* Resume HBA -- RISC reset needed. */
clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags);
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha);
qla2x00_wait_for_hba_online(vha);
scsi_unblock_requests(vha->host); scsi_unblock_requests(vha->host);
return rval; return rval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment