bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 16 May 2017 20:39:43 +0000 (16:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 May 2017 19:12:49 +0000 (15:12 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index b56c54d68d5e3d6d8748a23b014ca4177c7d6dee..03f55daecb20b70bec8924eb64f2146a90591590 100644 (file)
@@ -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);