forked from Minki/linux
qla2xxx: print the right array elements in qlt_async_event
Based upon Alan's patch from Coverity scan id 793583, these debug messages in qlt_async_event() should be starting from byte 0, which is always the Asynchronous Event Status Code from the parent switch statement. Also, rename reason_code -> login_code following the language used in 2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed Event Mailbox Register for mailbox[2]. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
863555be0c
commit
4f1d0f1971
@ -3960,7 +3960,7 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
|
|||||||
{
|
{
|
||||||
struct qla_hw_data *ha = vha->hw;
|
struct qla_hw_data *ha = vha->hw;
|
||||||
struct qla_tgt *tgt = ha->tgt.qla_tgt;
|
struct qla_tgt *tgt = ha->tgt.qla_tgt;
|
||||||
int reason_code;
|
int login_code;
|
||||||
|
|
||||||
ql_dbg(ql_dbg_tgt, vha, 0xe039,
|
ql_dbg(ql_dbg_tgt, vha, 0xe039,
|
||||||
"scsi(%ld): ha state %d init_done %d oper_mode %d topo %d\n",
|
"scsi(%ld): ha state %d init_done %d oper_mode %d topo %d\n",
|
||||||
@ -4003,9 +4003,9 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
|
|||||||
{
|
{
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b,
|
||||||
"qla_target(%d): Async LOOP_UP occured "
|
"qla_target(%d): Async LOOP_UP occured "
|
||||||
"(m[1]=%x, m[2]=%x, m[3]=%x, m[4]=%x)", vha->vp_idx,
|
"(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx,
|
||||||
le16_to_cpu(mailbox[1]), le16_to_cpu(mailbox[2]),
|
le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
|
||||||
le16_to_cpu(mailbox[3]), le16_to_cpu(mailbox[4]));
|
le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
|
||||||
if (tgt->link_reinit_iocb_pending) {
|
if (tgt->link_reinit_iocb_pending) {
|
||||||
qlt_send_notify_ack(vha, (void *)&tgt->link_reinit_iocb,
|
qlt_send_notify_ack(vha, (void *)&tgt->link_reinit_iocb,
|
||||||
0, 0, 0, 0, 0, 0);
|
0, 0, 0, 0, 0, 0);
|
||||||
@ -4020,23 +4020,24 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
|
|||||||
case MBA_RSCN_UPDATE:
|
case MBA_RSCN_UPDATE:
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c,
|
||||||
"qla_target(%d): Async event %#x occured "
|
"qla_target(%d): Async event %#x occured "
|
||||||
"(m[1]=%x, m[2]=%x, m[3]=%x, m[4]=%x)", vha->vp_idx, code,
|
"(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code,
|
||||||
le16_to_cpu(mailbox[1]), le16_to_cpu(mailbox[2]),
|
le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
|
||||||
le16_to_cpu(mailbox[3]), le16_to_cpu(mailbox[4]));
|
le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MBA_PORT_UPDATE:
|
case MBA_PORT_UPDATE:
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d,
|
||||||
"qla_target(%d): Port update async event %#x "
|
"qla_target(%d): Port update async event %#x "
|
||||||
"occured: updating the ports database (m[1]=%x, m[2]=%x, "
|
"occured: updating the ports database (m[0]=%x, m[1]=%x, "
|
||||||
"m[3]=%x, m[4]=%x)", vha->vp_idx, code,
|
"m[2]=%x, m[3]=%x)", vha->vp_idx, code,
|
||||||
le16_to_cpu(mailbox[1]), le16_to_cpu(mailbox[2]),
|
le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
|
||||||
le16_to_cpu(mailbox[3]), le16_to_cpu(mailbox[4]));
|
le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
|
||||||
reason_code = le16_to_cpu(mailbox[2]);
|
|
||||||
if (reason_code == 0x4)
|
login_code = le16_to_cpu(mailbox[2]);
|
||||||
|
if (login_code == 0x4)
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03e,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03e,
|
||||||
"Async MB 2: Got PLOGI Complete\n");
|
"Async MB 2: Got PLOGI Complete\n");
|
||||||
else if (reason_code == 0x7)
|
else if (login_code == 0x7)
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03f,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03f,
|
||||||
"Async MB 2: Port Logged Out\n");
|
"Async MB 2: Port Logged Out\n");
|
||||||
break;
|
break;
|
||||||
@ -4044,9 +4045,9 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
|
|||||||
default:
|
default:
|
||||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf040,
|
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf040,
|
||||||
"qla_target(%d): Async event %#x occured: "
|
"qla_target(%d): Async event %#x occured: "
|
||||||
"ignore (m[1]=%x, m[2]=%x, m[3]=%x, m[4]=%x)", vha->vp_idx,
|
"ignore (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx,
|
||||||
code, le16_to_cpu(mailbox[1]), le16_to_cpu(mailbox[2]),
|
code, le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
|
||||||
le16_to_cpu(mailbox[3]), le16_to_cpu(mailbox[4]));
|
le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user