Skip to content

Commit

Permalink
be2net: fix be_mcc_compl_process to identify eth_get_stat command
Browse files Browse the repository at this point in the history
eth_get_statistics and vlan_config command have same opcode.
Use opcode subsystem id to differentiate one from other.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Apr 20, 2011
1 parent 4fa9ed0 commit 6349935
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
}

if (compl_status == MCC_STATUS_SUCCESS) {
if (compl->tag0 == OPCODE_ETH_GET_STATISTICS) {
if ((compl->tag0 == OPCODE_ETH_GET_STATISTICS) &&
(compl->tag1 == CMD_SUBSYSTEM_ETH)) {
struct be_cmd_resp_get_stats *resp =
adapter->stats_cmd.va;
be_dws_le_to_cpu(&resp->hw_stats,
Expand Down Expand Up @@ -1096,6 +1097,7 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)

be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH,
OPCODE_ETH_GET_STATISTICS, sizeof(*req));
wrb->tag1 = CMD_SUBSYSTEM_ETH;
sge->pa_hi = cpu_to_le32(upper_32_bits(nonemb_cmd->dma));
sge->pa_lo = cpu_to_le32(nonemb_cmd->dma & 0xFFFFFFFF);
sge->len = cpu_to_le32(nonemb_cmd->size);
Expand Down

0 comments on commit 6349935

Please sign in to comment.