From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 03/11] bnxt_en: Handle VF_CFG_CHANGE event from firmware.
Date: Mon, 13 Jun 2016 02:25:30 -0400 [thread overview]
Message-ID: <1465799138-27529-4-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1465799138-27529-1-git-send-email-michael.chan@broadcom.com>
When the VF driver gets this event, the VF configuration has changed (such
as default VLAN). The VF driver will initiate a silent reset to pick up
the new configuration.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++++++
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index e30c43b..51f9e38 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -125,6 +125,7 @@ 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,
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED,
+ HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE,
HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE,
};
@@ -1358,6 +1359,11 @@ static int bnxt_async_event_process(struct bnxt *bp,
set_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event);
break;
}
+ case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
+ if (BNXT_PF(bp))
+ goto async_event_process_exit;
+ set_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event);
+ break;
default:
netdev_err(bp->dev, "unhandled ASYNC event (id 0x%x)\n",
event_id);
@@ -5738,6 +5744,9 @@ static void bnxt_sp_task(struct work_struct *work)
if (test_and_clear_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event))
bnxt_reset(bp, false);
+ if (test_and_clear_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event))
+ bnxt_reset(bp, true);
+
if (test_and_clear_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event))
bnxt_get_port_module_status(bp);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 2824d65..538eb1c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1018,6 +1018,7 @@ struct bnxt {
#define BNXT_HWRM_PF_UNLOAD_SP_EVENT 8
#define BNXT_PERIODIC_STATS_SP_EVENT 9
#define BNXT_HWRM_PORT_MODULE_SP_EVENT 10
+#define BNXT_RESET_TASK_SILENT_SP_EVENT 11
struct bnxt_pf_info pf;
#ifdef CONFIG_BNXT_SRIOV
--
1.8.3.1
next prev parent reply other threads:[~2016-06-13 6:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 6:25 [PATCH net-next 00/11] bnxt_en: Updates for net-next Michael Chan
2016-06-13 6:25 ` [PATCH net-next 01/11] bnxt_en: Add function for VF driver to query default VLAN Michael Chan
2016-06-13 6:25 ` [PATCH net-next 02/11] bnxt_en: Add new function bnxt_reset() Michael Chan
2016-06-13 6:25 ` Michael Chan [this message]
2016-06-13 6:25 ` [PATCH net-next 04/11] bnxt_en: Enable NPAR (NIC Partitioning) Support Michael Chan
2016-06-13 6:25 ` [PATCH net-next 05/11] bnxt_en: Add PCI device ID for 57404 NPAR devices Michael Chan
2016-06-13 6:25 ` [PATCH net-next 06/11] bnxt_en: Define the supported chip numbers Michael Chan
2016-06-13 6:25 ` [PATCH net-next 07/11] bnxt_en: Refactor bnxt_gro_skb() Michael Chan
2016-06-13 6:25 ` [PATCH net-next 08/11] bnxt_en: Add GRO logic for BCM5731X chips Michael Chan
2016-06-13 6:25 ` [PATCH net-next 09/11] bnxt_en: Add BCM5731X and BCM5741X device IDs Michael Chan
2016-06-13 6:25 ` [PATCH net-next 10/11] bnxt_en: Don't allow autoneg on cards that don't support it Michael Chan
2016-06-13 6:25 ` [PATCH net-next 11/11] bnxt_en: Support new ETHTOOL_{G|S}LINKSETTINGS API Michael Chan
2016-06-14 23:26 ` [PATCH net-next 00/11] bnxt_en: Updates for net-next 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=1465799138-27529-4-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).