diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-07-10 16:56:01 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 15:14:46 -0400 |
commit | 42e421b184967c8bc70d72eed8e1b179e9a51acb (patch) | |
tree | 6176b464c6aae4010c227921832372a59c259da2 /drivers/scsi/qla2xxx/qla_init.c | |
parent | e792121ec85672c1fa48f79d13986a3f4f56c590 (diff) |
[SCSI] qla2xxx: Verify the RISC is not in ROM code if firmware-load is disabled.
Add an additional check to verify that the current executing
firmware is in fact non-ROM code. The non-ROM Get-ID mailbox
command is used for verification.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f8cfeb0e91a..fd3ff5e5713 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -334,6 +334,8 @@ static int qla2x00_isp_firmware(scsi_qla_host_t *ha) { int rval; + uint16_t loop_id, topo, sw_cap; + uint8_t domain, area, al_pa; /* Assume loading risc code */ rval = QLA_FUNCTION_FAILED; @@ -345,6 +347,11 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) /* Verify checksum of loaded RISC code. */ rval = qla2x00_verify_checksum(ha, ha->fw_srisc_address); + if (rval == QLA_SUCCESS) { + /* And, verify we are not in ROM code. */ + rval = qla2x00_get_adapter_id(ha, &loop_id, &al_pa, + &area, &domain, &topo, &sw_cap); + } } if (rval) { |