bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 16 May 2017 20:39:44 +0000 (16:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 May 2017 19:12:49 +0000 (15:12 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c

index 46de2f8ff024aad59341ecf5963ccbd9082dae9e..5c6dd0ce209f627e4c5bd74efa1ef581d1eb46ad 100644 (file)
@@ -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;