diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2016-03-02 13:47:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-02 13:31:56 -0500 |
commit | ca4f2d5036be809b0f82ce38a7663d237efa3986 (patch) | |
tree | 34756e4ea4c9eea5abb3acea50f3ecfe59e3dec0 /drivers/net/ethernet/broadcom/bnx2x | |
parent | a524ef77d54d7e12045841f4fcc430c1850f71f2 (diff) | |
download | linux-ca4f2d5036be809b0f82ce38a7663d237efa3986.tar.bz2 |
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: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index b707ba8a7535..0e0bcbdb84d1 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -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); |