Commit 049b467d authored by Barak Witkowski's avatar Barak Witkowski Committed by David S. Miller

bnx2x: Correct PFC disablement

bnx2x driver could only have enabled pfc via usage of dcbnl; now, it can
also correctly disable it.
Signed-off-by: default avatarBarak Witkowski <barak@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd1dfce2
......@@ -2052,10 +2052,13 @@ static void bnx2x_dcbnl_set_pfc_cfg(struct net_device *netdev, int prio,
if (!bnx2x_dcbnl_set_valid(bp) || prio >= MAX_PFC_PRIORITIES)
return;
bp->dcbx_config_params.admin_pfc_bitmap |= ((setting ? 1 : 0) << prio);
if (setting)
if (setting) {
bp->dcbx_config_params.admin_pfc_bitmap |= (1 << prio);
bp->dcbx_config_params.admin_pfc_tx_enable = 1;
} else {
bp->dcbx_config_params.admin_pfc_bitmap &= ~(1 << prio);
}
}
static void bnx2x_dcbnl_get_pfc_cfg(struct net_device *netdev, int prio,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment