diff options
author | Barak Witkowski <barak@broadcom.com> | 2012-12-02 05:05:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-03 02:23:01 +0100 |
commit | 049b467d7a57e7b978ce063ee3639670f383fb5c (patch) | |
tree | cbff13ebf663575da31d962cf7e30cd28420a037 | |
parent | bnx2x: fix 'Ethtool -A' when autoneg (diff) | |
download | linux-049b467d7a57e7b978ce063ee3639670f383fb5c.tar.xz linux-049b467d7a57e7b978ce063ee3639670f383fb5c.zip |
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: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c index c8c034027ce5..10bc093d2ca4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c @@ -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, |