From: Sathya Perla <sathya.perla@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH 2/4] be2net: fix payload_len value for GET_MAC_LIST cmd req
Date: Wed, 8 May 2013 17:35:48 +0530 [thread overview]
Message-ID: <1368014750-25065-3-git-send-email-sathya.perla@emulex.com> (raw)
In-Reply-To: <1368014750-25065-1-git-send-email-sathya.perla@emulex.com>
The buffer size for a FW cmd request must be big enough to fit the response,
else the cmd fails. For GET_MAC_LIST cmd, though the memory allocated for
the cmd is big enough to fit the response, the payload_len value in the
WRB hdr is being set to the request length only.
Fix this for GET_MAC_LIST cmd.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index e1e5bb9..fd7b547 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -2640,9 +2640,8 @@ int be_cmd_get_mac_from_list(struct be_adapter *adapter, u8 *mac,
req = get_mac_list_cmd.va;
be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
- OPCODE_COMMON_GET_MAC_LIST, sizeof(*req),
- wrb, &get_mac_list_cmd);
-
+ OPCODE_COMMON_GET_MAC_LIST,
+ get_mac_list_cmd.size, wrb, &get_mac_list_cmd);
req->hdr.domain = domain;
req->mac_type = MAC_ADDRESS_TYPE_NETWORK;
req->perm_override = 1;
--
1.7.1
next prev parent reply other threads:[~2013-05-08 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 12:05 [PATCH 0/4] be2net: fixes Sathya Perla
2013-05-08 12:05 ` [PATCH 1/4] be2net: provision VF resources before enabling SR-IOV Sathya Perla
2013-05-08 12:05 ` Sathya Perla [this message]
2013-05-08 12:05 ` [PATCH 3/4] be2net: fix EQ from getting full while cleaning RX CQ Sathya Perla
2013-05-08 12:05 ` [PATCH 4/4] be2net: disable TX in be_close() Sathya Perla
2013-05-08 18:59 ` [PATCH 0/4] be2net: fixes David Miller
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=1368014750-25065-3-git-send-email-sathya.perla@emulex.com \
--to=sathya.perla@emulex.com \
--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;
as well as URLs for NNTP newsgroup(s).