diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2013-04-24 05:44:59 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-25 00:33:53 +0400 |
commit | ba35a0fd1ff7b5e91a6eee145e56887edffa194c (patch) | |
tree | 4f16baab31f401dc0d69abb1d365e27fedbc4bdf /drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |
parent | 2c2d06d5126e62e90aee71da9b85c9d95de6bbe2 (diff) | |
download | linux-ba35a0fd1ff7b5e91a6eee145e56887edffa194c.tar.xz |
bnx2x: Allow RX/TX pause control in autoneg
Currently, when link is configured to auto-negotiate the flow control,
disabling RX/TX pause via ethtool doesn't work.
This fixes the behaviour, advertising asymmetric pause in case either one
is exclusively enabled.
Signed-off-by: Yaniv Rosner <yanivr@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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 40f58d73de78..9d64b988ab34 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c @@ -3426,13 +3426,19 @@ static void bnx2x_calc_ieee_aneg_adv(struct bnx2x_phy *phy, switch (phy->req_flow_ctrl) { case BNX2X_FLOW_CTRL_AUTO: - if (params->req_fc_auto_adv == BNX2X_FLOW_CTRL_BOTH) + switch (params->req_fc_auto_adv) { + case BNX2X_FLOW_CTRL_BOTH: *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH; - else + break; + case BNX2X_FLOW_CTRL_RX: + case BNX2X_FLOW_CTRL_TX: *ieee_fc |= - MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC; + MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC; + break; + default: + break; + } break; - case BNX2X_FLOW_CTRL_TX: *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC; break; |