public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@emulex.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH net-next 3/5] be2net: fix be_mcc_compl_process to identify eth_get_stat command
Date: Mon, 18 Apr 2011 17:30:21 -0500	[thread overview]
Message-ID: <20110418223021.GA9499@akhaparde-VBox> (raw)

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>
---
 drivers/net/benet/be_cmds.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 11b774a..a94e980 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -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,
@@ -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);
-- 
1.7.1


             reply	other threads:[~2011-04-18 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 22:30 Ajit Khaparde [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-19 22:11 [PATCH net-next 3/5] be2net: fix be_mcc_compl_process to identify eth_get_stat command Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110418223021.GA9499@akhaparde-VBox \
    --to=ajit.khaparde@emulex.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox