OSDN Git Service

bnxt_en: Clear DCB settings after firmware reset.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 8 Mar 2020 22:45:50 +0000 (18:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:54:46 +0000 (21:54 -0700)
The driver stores a copy of the DCB settings that have been applied to
the firmware.  After firmware reset, the firmware settings are gone and
will revert back to default.  Clear the driver's copy so that if there
is a DCBNL request to get the settings, the driver will retrieve the
current settings from the firmware.  lldpad keeps the DCB settings in
userspace and will re-apply the settings if it 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.c

index 634b1bd..500d4c8 100644 (file)
@@ -8787,6 +8787,7 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
                        bnxt_free_ctx_mem(bp);
                        kfree(bp->ctx);
                        bp->ctx = NULL;
+                       bnxt_dcb_free(bp);
                        rc = bnxt_fw_init_one(bp);
                        if (rc) {
                                set_bit(BNXT_STATE_ABORT_ERR, &bp->state);