diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-06-17 13:30:30 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-21 11:52:44 -0400 |
commit | 9d2683c05ce57b4a0231e028927bf1197e8324a8 (patch) | |
tree | 0c5dcc189109552e97d0fe117acc8d0ade15748b | |
parent | 1bb395485160d203a726a19e4fcb1a154748d804 (diff) |
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: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 779ce14e9a2a..fe69f3057671 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1267,17 +1267,22 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) | |||
1267 | 1267 | ||
1268 | mcp->mb[0] = MBC_GET_FIRMWARE_STATE; | 1268 | mcp->mb[0] = MBC_GET_FIRMWARE_STATE; |
1269 | mcp->out_mb = MBX_0; | 1269 | mcp->out_mb = MBX_0; |
1270 | mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; | 1270 | if (IS_FWI2_CAPABLE(vha->hw)) |
1271 | mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; | ||
1272 | else | ||
1273 | mcp->in_mb = MBX_1|MBX_0; | ||
1271 | mcp->tov = MBX_TOV_SECONDS; | 1274 | mcp->tov = MBX_TOV_SECONDS; |
1272 | mcp->flags = 0; | 1275 | mcp->flags = 0; |
1273 | rval = qla2x00_mailbox_command(vha, mcp); | 1276 | rval = qla2x00_mailbox_command(vha, mcp); |
1274 | 1277 | ||
1275 | /* Return firmware states. */ | 1278 | /* Return firmware states. */ |
1276 | states[0] = mcp->mb[1]; | 1279 | states[0] = mcp->mb[1]; |
1277 | states[1] = mcp->mb[2]; | 1280 | if (IS_FWI2_CAPABLE(vha->hw)) { |
1278 | states[2] = mcp->mb[3]; | 1281 | states[1] = mcp->mb[2]; |
1279 | states[3] = mcp->mb[4]; | 1282 | states[2] = mcp->mb[3]; |
1280 | states[4] = mcp->mb[5]; | 1283 | states[3] = mcp->mb[4]; |
1284 | states[4] = mcp->mb[5]; | ||
1285 | } | ||
1281 | 1286 | ||
1282 | if (rval != QLA_SUCCESS) { | 1287 | if (rval != QLA_SUCCESS) { |
1283 | /*EMPTY*/ | 1288 | /*EMPTY*/ |