From: "Barak Witkowski" <barak@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: "Barak Witkowski" <barak@broadcom.com>,
"Eilon Greenstein" <eilong@broadcom.com>
Subject: [PATCH net-next 1/2] bnx2x: dont handle storage drv_info req if no cnic
Date: Wed, 7 Dec 2011 15:45:35 +0200 [thread overview]
Message-ID: <1323265536-9760-1-git-send-email-barak@broadcom.com> (raw)
In-Reply-To: <Barak Witkowski <barak@broadcom.com>
This patch returns ACK with zeroed buffer to FW upon fcoe/iscsi drv_info
request if cnic is not defined. This is better handling in comparison to
send NACK to FW upon such request, as it's a valid request.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 418e7d3..d104695 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -2941,9 +2941,9 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp)
ether_stat->rxq_size = bp->rx_ring_size;
}
+#ifdef BCM_CNIC
static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
{
-#ifdef BCM_CNIC
struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
struct fcoe_stats_info *fcoe_stat =
&bp->slowpath->drv_info_to_mcp.fcoe_stat;
@@ -3029,12 +3029,12 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
/* ask L5 driver to add data to the struct */
bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD);
-#endif
}
+#endif
+#ifdef BCM_CNIC
static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
{
-#ifdef BCM_CNIC
struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
struct iscsi_stats_info *iscsi_stat =
&bp->slowpath->drv_info_to_mcp.iscsi_stat;
@@ -3046,8 +3046,8 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
/* ask L5 driver to add data to the struct */
bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD);
-#endif
}
+#endif
/* called due to MCP event (on pmf):
* reread new bandwidth configuration
@@ -3091,10 +3091,14 @@ static void bnx2x_handle_drv_info_req(struct bnx2x *bp)
bnx2x_drv_info_ether_stat(bp);
break;
case FCOE_STATS_OPCODE:
+#ifdef BCM_CNIC
bnx2x_drv_info_fcoe_stat(bp);
+#endif
break;
case ISCSI_STATS_OPCODE:
+#ifdef BCM_CNIC
bnx2x_drv_info_iscsi_stat(bp);
+#endif
break;
default:
/* if op code isn't supported - send NACK */
--
1.7.7.4
next parent reply other threads:[~2011-12-07 13:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Barak Witkowski <barak@broadcom.com>
2011-12-07 13:45 ` Barak Witkowski [this message]
2011-12-07 13:45 ` [PATCH net-next 2/2] bnx2x: fix typo in fcoe stats collection Barak Witkowski
2011-12-07 18:39 ` David Miller
2011-12-08 14:13 ` [BUG] bnx2x: crash at boot Eric Dumazet
2011-12-07 17:04 ` [PATCH net-next 1/2] bnx2x: dont handle storage drv_info req if no cnic Joe Perches
2011-12-07 18:45 ` David Miller
2011-12-14 10:14 ` [PATCH net-next 1/1] bnx2x: handle vpd data longer than 128 bytes Barak Witkowski
2011-12-14 18:35 ` 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=1323265536-9760-1-git-send-email-barak@broadcom.com \
--to=barak@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.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).