From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 06/10] bnxt_en: Set async event bits when registering with the firmware.
Date: Tue, 5 Apr 2016 04:22:38 -0400 [thread overview]
Message-ID: <1459844562-24576-7-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1459844562-24576-1-git-send-email-michael.chan@broadcom.com>
Currently, the driver only sets bit 0 of the async_event_fwd fields.
To be compatible with the latest spec, we need to set the
appropriate event bits handled by the driver. We should be handling
link change and PF driver unload events, so these 2 bits should be
set.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 2c3c795..dd0b32c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -118,6 +118,11 @@ static const u16 bnxt_vf_req_snif[] = {
HWRM_CFA_L2_FILTER_ALLOC,
};
+static const u16 bnxt_async_events_arr[] = {
+ HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE,
+ HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD,
+};
+
static bool bnxt_vf_pciid(enum board_idx idx)
{
return (idx == BCM57304_VF || idx == BCM57404_VF);
@@ -2751,6 +2756,8 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
{
struct hwrm_func_drv_rgtr_input req = {0};
int i;
+ DECLARE_BITMAP(async_events_bmap, 256);
+ u32 *events = (u32 *)async_events_bmap;
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_RGTR, -1, -1);
@@ -2759,10 +2766,13 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
FUNC_DRV_RGTR_REQ_ENABLES_VER |
FUNC_DRV_RGTR_REQ_ENABLES_ASYNC_EVENT_FWD);
- /* TODO: current async event fwd bits are not defined and the firmware
- * only checks if it is non-zero to enable async event forwarding
- */
- req.async_event_fwd[0] |= cpu_to_le32(1);
+ memset(async_events_bmap, 0, sizeof(async_events_bmap));
+ for (i = 0; i < ARRAY_SIZE(bnxt_async_events_arr); i++)
+ __set_bit(bnxt_async_events_arr[i], async_events_bmap);
+
+ for (i = 0; i < 8; i++)
+ req.async_event_fwd[i] |= cpu_to_le32(events[i]);
+
req.os_type = cpu_to_le16(FUNC_DRV_RGTR_REQ_OS_TYPE_LINUX);
req.ver_maj = DRV_VER_MAJ;
req.ver_min = DRV_VER_MIN;
--
1.8.3.1
next prev parent reply other threads:[~2016-04-05 8:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 8:22 [PATCH net-next 00/10] bnxt_en: Updates for net-next Michael Chan
2016-04-05 8:22 ` [PATCH net-next 01/10] bnxt_en: Update to Firmware 1.2.2 spec Michael Chan
2016-04-05 8:22 ` [PATCH net-next 02/10] bnxt_en: Improve flow control autoneg with Firmware 1.2.1 interface Michael Chan
2016-04-05 8:22 ` [PATCH net-next 03/10] bnxt_en: Add basic EEE support Michael Chan
2016-04-05 8:22 ` [PATCH net-next 04/10] bnxt_en: Add EEE setup code Michael Chan
2016-04-05 8:22 ` [PATCH net-next 05/10] bnxt_en: Add get_eee() and set_eee() ethtool support Michael Chan
2016-04-05 10:07 ` Ben Hutchings
2016-04-05 10:36 ` Michael Chan
2016-04-05 21:22 ` Ben Hutchings
2016-04-05 8:22 ` Michael Chan [this message]
2016-04-05 8:22 ` [PATCH net-next 07/10] bnxt_en: Add unsupported SFP+ module warnings Michael Chan
2016-04-05 8:22 ` [PATCH net-next 08/10] bnxt_en: Provide NVM information via Ethtool GEEPROM Michael Chan
2016-04-05 8:22 ` [PATCH net-next 09/10] bnxt_en: Check for valid forced speed during ethtool -s Michael Chan
2016-04-05 8:22 ` [PATCH net-next 10/10] bnxt_en: Improve ethtool .get_settings() Michael Chan
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=1459844562-24576-7-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.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;
as well as URLs for NNTP newsgroup(s).