diff options
author | Pavaluca Matei-B46610 <matei.pavaluca@freescale.com> | 2014-10-27 08:42:43 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-29 18:33:16 (GMT) |
commit | 43ef8d29eebb6f533f11439d48a927426c5a1918 (patch) | |
tree | 444e5b206b87b439cfeea306b21b3b3bf46cf4d4 /drivers | |
parent | cf987afc7eb182d04071bed5e2aaea8eb7d17052 (diff) | |
download | linux-43ef8d29eebb6f533f11439d48a927426c5a1918.tar.xz |
Fix the way the local advertising flow options are determined
Local flow control options needed in order to resolve the negotiation
are incorrectly calculated.
Previously 'mii_advertise_flowctrl' was called to determine the local advertising
options, but these were determined based on FLOW_CTRL_RX/TX flags which are
never set through ethtool.
The patch simply translates from ethtool flow options to mii flow options.
Signed-off-by: Pavaluca Matei <matei.pavaluca@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 2485b74..329efca 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -3373,7 +3373,11 @@ static u32 gfar_get_flowctrl_cfg(struct gfar_private *priv) if (phydev->asym_pause) rmt_adv |= LPA_PAUSE_ASYM; - lcl_adv = mii_advertise_flowctrl(phydev->advertising); + lcl_adv = 0; + if (phydev->advertising & ADVERTISED_Pause) + lcl_adv |= ADVERTISE_PAUSE_CAP; + if (phydev->advertising & ADVERTISED_Asym_Pause) + lcl_adv |= ADVERTISE_PAUSE_ASYM; flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv); if (flowctrl & FLOW_CTRL_TX) |