提交 ca4f2d50 编写于 作者: M Michal Schmidt 提交者: David S. Miller

bnx2x: access cfc_del_event only if the opcode is CFC_DEL

It's not really a bug, but it was odd that bnx2x_eq_int() read the
message data as if it were a cfc_del_event regardless of the event type.
It's cleaner to access only the appropriate member of union event_data
after checking the event opcode.
Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a524ef77
......@@ -5477,9 +5477,6 @@ static void bnx2x_eq_int(struct bnx2x *bp)
goto next_spqe;
}
/* elem CID originates from FW; actually LE */
cid = SW_CID((__force __le32)
elem->message.data.cfc_del_event.cid);
opcode = elem->message.opcode;
/* handle eq element */
......@@ -5502,6 +5499,11 @@ static void bnx2x_eq_int(struct bnx2x *bp)
* we may want to verify here that the bp state is
* HALTING
*/
/* elem CID originates from FW; actually LE */
cid = SW_CID((__force __le32)
elem->message.data.cfc_del_event.cid);
DP(BNX2X_MSG_SP,
"got delete ramrod for MULTI[%d]\n", cid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册