bnx2x: propagate DCBX negotiation
We need propagate the DCBX results from PMF to other functions on the same port, in order to properly update netdev structure and allow following new ETS and PFC configurations. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b306f5edf6
commit
00253a8cf3
4 changed files with 90 additions and 46 deletions
|
@ -2318,12 +2318,6 @@ static void bnx2x_calc_vn_weight_sum(struct bnx2x *bp)
|
|||
CMNG_FLAGS_PER_PORT_FAIRNESS_VN;
|
||||
}
|
||||
|
||||
/* returns func by VN for current port */
|
||||
static inline int func_by_vn(struct bnx2x *bp, int vn)
|
||||
{
|
||||
return 2 * vn + BP_PORT(bp);
|
||||
}
|
||||
|
||||
static void bnx2x_init_vn_minmax(struct bnx2x *bp, int vn)
|
||||
{
|
||||
struct rate_shaping_vars_per_vn m_rs_vn;
|
||||
|
@ -2475,22 +2469,6 @@ static void bnx2x_cmng_fns_init(struct bnx2x *bp, u8 read_cfg, u8 cmng_type)
|
|||
"rate shaping and fairness are disabled\n");
|
||||
}
|
||||
|
||||
static inline void bnx2x_link_sync_notify(struct bnx2x *bp)
|
||||
{
|
||||
int func;
|
||||
int vn;
|
||||
|
||||
/* Set the attention towards other drivers on the same port */
|
||||
for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) {
|
||||
if (vn == BP_VN(bp))
|
||||
continue;
|
||||
|
||||
func = func_by_vn(bp, vn);
|
||||
REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_0 +
|
||||
(LINK_SYNC_ATTENTION_BIT_FUNC_0 + func)*4, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function is called upon link interrupt */
|
||||
static void bnx2x_link_attn(struct bnx2x *bp)
|
||||
{
|
||||
|
@ -2549,6 +2527,9 @@ void bnx2x__link_status_update(struct bnx2x *bp)
|
|||
if (bp->state != BNX2X_STATE_OPEN)
|
||||
return;
|
||||
|
||||
/* read updated dcb configuration */
|
||||
bnx2x_dcbx_pmf_update(bp);
|
||||
|
||||
bnx2x_link_status_update(&bp->link_params, &bp->link_vars);
|
||||
|
||||
if (bp->link_vars.link_up)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue