summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2019-08-29 23:54:49 -0400
committerDavid S. Miller <davem@davemloft.net>2019-08-30 14:02:18 -0700
commitba642ab773db97c32293547485f562d2dfc06666 (patch)
treee4c07ccce286501154441832a9eec4f5972ea904 /drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
parent5bedb5296e33e889818d77c8ec69040481fab157 (diff)
bnxt_en: Prepare bnxt_init_one() to be called multiple times.
In preparation for the new firmware reset feature, some of the logic in bnxt_init_one() and related functions will be called again after firmware has reset. Reset some of the flags and capabilities so that everything that can change can be re-initialized. Refactor some functions to probe firmware versions and capabilities. Check some buffers before allocating as they may have been allocated previously. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
index a2ffc3eee675..fb6f30d0d1d0 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
@@ -389,6 +389,7 @@ static int bnxt_hwrm_queue_dscp_qcaps(struct bnxt *bp)
struct hwrm_queue_dscp_qcaps_input req = {0};
int rc;
+ bp->max_dscp_value = 0;
if (bp->hwrm_spec_code < 0x10800 || BNXT_VF(bp))
return 0;
@@ -718,6 +719,7 @@ static const struct dcbnl_rtnl_ops dcbnl_ops = {
void bnxt_dcb_init(struct bnxt *bp)
{
+ bp->dcbx_cap = 0;
if (bp->hwrm_spec_code < 0x10501)
return;