Commit 9d2683c0 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

qla2xxx: Limit querying to supported mailbox-registers while reading FW state.

Pre-ISP24xx chips have dedicated uses for mailbox 4 and 5 which
software should typically not query nor update.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 1bb39548
...@@ -1267,17 +1267,22 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) ...@@ -1267,17 +1267,22 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states)
mcp->mb[0] = MBC_GET_FIRMWARE_STATE; mcp->mb[0] = MBC_GET_FIRMWARE_STATE;
mcp->out_mb = MBX_0; mcp->out_mb = MBX_0;
mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; if (IS_FWI2_CAPABLE(vha->hw))
mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
else
mcp->in_mb = MBX_1|MBX_0;
mcp->tov = MBX_TOV_SECONDS; mcp->tov = MBX_TOV_SECONDS;
mcp->flags = 0; mcp->flags = 0;
rval = qla2x00_mailbox_command(vha, mcp); rval = qla2x00_mailbox_command(vha, mcp);
/* Return firmware states. */ /* Return firmware states. */
states[0] = mcp->mb[1]; states[0] = mcp->mb[1];
states[1] = mcp->mb[2]; if (IS_FWI2_CAPABLE(vha->hw)) {
states[2] = mcp->mb[3]; states[1] = mcp->mb[2];
states[3] = mcp->mb[4]; states[2] = mcp->mb[3];
states[4] = mcp->mb[5]; states[3] = mcp->mb[4];
states[4] = mcp->mb[5];
}
if (rval != QLA_SUCCESS) { if (rval != QLA_SUCCESS) {
/*EMPTY*/ /*EMPTY*/
......
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