diff options
author | Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> | 2010-07-23 15:28:26 +0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 09:06:09 -0500 |
commit | 0f2d962f4d120e93b4d74d13c2e8038e9e4358b9 (patch) | |
tree | ee2a02f7ba2412b50f9fc6eb4779a4e2eeacce0e /drivers/scsi/qla2xxx/qla_sup.c | |
parent | e8c72ba51a159f5d1cb195d3fb47262c782939d9 (diff) | |
download | linux-next-0f2d962f4d120e93b4d74d13c2e8038e9e4358b9.tar.gz |
[SCSI] qla2xxx: Check for golden firmware and show version if available
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 3c5115f60739..df288dc829e0 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -2759,6 +2759,28 @@ qla24xx_get_flash_version(scsi_qla_host_t *vha, void *mbuf) ha->fw_revision[3] = dcode[3]; } + /* Check for golden firmware and get version if available */ + if (!IS_QLA81XX(ha)) { + /* Golden firmware is not present in non 81XX adapters */ + return ret; + } + + memset(ha->gold_fw_version, 0, sizeof(ha->gold_fw_version)); + dcode = mbuf; + ha->isp_ops->read_optrom(vha, (uint8_t *)dcode, + ha->flt_region_gold_fw << 2, 32); + + if (dcode[4] == 0xFFFFFFFF && dcode[5] == 0xFFFFFFFF && + dcode[6] == 0xFFFFFFFF && dcode[7] == 0xFFFFFFFF) { + DEBUG2(qla_printk(KERN_INFO, ha, + "%s(%ld): Unrecognized golden fw at 0x%x.\n", + __func__, vha->host_no, ha->flt_region_gold_fw * 4)); + return ret; + } + + for (i = 4; i < 8; i++) + ha->gold_fw_version[i-4] = be32_to_cpu(dcode[i]); + return ret; } |