aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-24 12:08:03 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:47 -0400
commit55a961581fd34632bf724dd144c0dbf740c9fede (patch)
tree2661c22da7c24213cbc73ede440f89964a5c9a00 /drivers/scsi/qla2xxx/qla_mbx.c
parentbe67e6530b006b10380a5f0c49cdf974426a22e9 (diff)
[SCSI] qla2xxx: Update MPI/PHY version retrieval codes.
Reflects layout and format of latest specification. 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_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 91e133bd8e60..b380c6fdbe40 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -408,7 +408,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
408void 408void
409qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, 409qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
410 uint16_t *subminor, uint16_t *attributes, uint32_t *memory, uint8_t *mpi, 410 uint16_t *subminor, uint16_t *attributes, uint32_t *memory, uint8_t *mpi,
411 uint32_t *mpi_caps) 411 uint32_t *mpi_caps, uint8_t *phy)
412{ 412{
413 int rval; 413 int rval;
414 mbx_cmd_t mc; 414 mbx_cmd_t mc;
@@ -420,7 +420,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
420 mcp->out_mb = MBX_0; 420 mcp->out_mb = MBX_0;
421 mcp->in_mb = MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; 421 mcp->in_mb = MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
422 if (IS_QLA81XX(vha->hw)) 422 if (IS_QLA81XX(vha->hw))
423 mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10; 423 mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10|MBX_9|MBX_8;
424 mcp->flags = 0; 424 mcp->flags = 0;
425 mcp->tov = MBX_TOV_SECONDS; 425 mcp->tov = MBX_TOV_SECONDS;
426 rval = qla2x00_mailbox_command(vha, mcp); 426 rval = qla2x00_mailbox_command(vha, mcp);
@@ -435,11 +435,13 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
435 else 435 else
436 *memory = (mcp->mb[5] << 16) | mcp->mb[4]; 436 *memory = (mcp->mb[5] << 16) | mcp->mb[4];
437 if (IS_QLA81XX(vha->hw)) { 437 if (IS_QLA81XX(vha->hw)) {
438 mpi[0] = mcp->mb[10] >> 8; 438 mpi[0] = mcp->mb[10] & 0xff;
439 mpi[1] = mcp->mb[10] & 0xff; 439 mpi[1] = mcp->mb[11] >> 8;
440 mpi[2] = mcp->mb[11] >> 8; 440 mpi[2] = mcp->mb[11] & 0xff;
441 mpi[3] = mcp->mb[11] & 0xff;
442 *mpi_caps = (mcp->mb[12] << 16) | mcp->mb[13]; 441 *mpi_caps = (mcp->mb[12] << 16) | mcp->mb[13];
442 phy[0] = mcp->mb[8] & 0xff;
443 phy[1] = mcp->mb[9] >> 8;
444 phy[2] = mcp->mb[9] & 0xff;
443 } 445 }
444 446
445 if (rval != QLA_SUCCESS) { 447 if (rval != QLA_SUCCESS) {