* [PATCH net 0/2] bnxt_en: DCBX fixes.
@ 2017-05-16 20:39 Michael Chan
2017-05-16 20:39 ` [PATCH net 1/2] bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration Michael Chan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Chan @ 2017-05-16 20:39 UTC (permalink / raw)
To: davem; +Cc: netdev
2 bug fixes for the case where the NIC's firmware DCBX agent is enabled.
With these fixes, we will return the proper information to lldpad.
Michael Chan (2):
bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX
configuration.
bnxt_en: Check status of firmware DCBX agent before setting
DCB_CAP_DCBX_HOST.
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +--
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 6 ++++--
2 files changed, 5 insertions(+), 4 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration.
2017-05-16 20:39 [PATCH net 0/2] bnxt_en: DCBX fixes Michael Chan
@ 2017-05-16 20:39 ` Michael Chan
2017-05-16 20:39 ` [PATCH net 2/2] bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST Michael Chan
2017-05-17 19:13 ` [PATCH net 0/2] bnxt_en: DCBX fixes David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2017-05-16 20:39 UTC (permalink / raw)
To: davem; +Cc: netdev
In the current code, bnxt_dcb_init() is called too early before we
determine if the firmware DCBX agent is running or not. As a result,
we are not setting the DCB_CAP_DCBX_HOST and DCB_CAP_DCBX_LLD_MANAGED
flags properly to report to DCBNL.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b56c54d..03f55da 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -7630,8 +7630,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->min_mtu = ETH_ZLEN;
dev->max_mtu = BNXT_MAX_MTU;
- bnxt_dcb_init(bp);
-
#ifdef CONFIG_BNXT_SRIOV
init_waitqueue_head(&bp->sriov_cfg_wait);
#endif
@@ -7669,6 +7667,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
bnxt_hwrm_func_qcfg(bp);
bnxt_hwrm_port_led_qcaps(bp);
bnxt_ethtool_init(bp);
+ bnxt_dcb_init(bp);
bnxt_set_rx_skb_mode(bp, false);
bnxt_set_tpa_flags(bp);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST.
2017-05-16 20:39 [PATCH net 0/2] bnxt_en: DCBX fixes Michael Chan
2017-05-16 20:39 ` [PATCH net 1/2] bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration Michael Chan
@ 2017-05-16 20:39 ` Michael Chan
2017-05-17 19:13 ` [PATCH net 0/2] bnxt_en: DCBX fixes David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2017-05-16 20:39 UTC (permalink / raw)
To: davem; +Cc: netdev
Otherwise, all the host based DCBX settings from lldpad will fail if the
firmware DCBX agent is running.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
index 46de2f8..5c6dd0c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
@@ -553,8 +553,10 @@ static u8 bnxt_dcbnl_setdcbx(struct net_device *dev, u8 mode)
if ((mode & DCB_CAP_DCBX_VER_CEE) || !(mode & DCB_CAP_DCBX_VER_IEEE))
return 1;
- if ((mode & DCB_CAP_DCBX_HOST) && BNXT_VF(bp))
- return 1;
+ if (mode & DCB_CAP_DCBX_HOST) {
+ if (BNXT_VF(bp) || (bp->flags & BNXT_FLAG_FW_LLDP_AGENT))
+ return 1;
+ }
if (mode == bp->dcbx_cap)
return 0;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] bnxt_en: DCBX fixes.
2017-05-16 20:39 [PATCH net 0/2] bnxt_en: DCBX fixes Michael Chan
2017-05-16 20:39 ` [PATCH net 1/2] bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration Michael Chan
2017-05-16 20:39 ` [PATCH net 2/2] bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST Michael Chan
@ 2017-05-17 19:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-05-17 19:13 UTC (permalink / raw)
To: michael.chan; +Cc: netdev
From: Michael Chan <michael.chan@broadcom.com>
Date: Tue, 16 May 2017 16:39:42 -0400
> 2 bug fixes for the case where the NIC's firmware DCBX agent is
> enabled. With these fixes, we will return the proper information to
> lldpad.
Series applied, thanks Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-17 19:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16 20:39 [PATCH net 0/2] bnxt_en: DCBX fixes Michael Chan
2017-05-16 20:39 ` [PATCH net 1/2] bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration Michael Chan
2017-05-16 20:39 ` [PATCH net 2/2] bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST Michael Chan
2017-05-17 19:13 ` [PATCH net 0/2] bnxt_en: DCBX fixes David Miller
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).