summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-07-08 01:22:39 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-08 06:21:21 +0200
commit9671a42e4508db8a0196110b098fd8550304ab14 (patch)
tree399a3c63fc22a897f70dc10fbf00218c49da2e12 /drivers
parentnet: fec: iMX6 FEC does not support half-duplex gigabit (diff)
downloadlinux-9671a42e4508db8a0196110b098fd8550304ab14.tar.xz
linux-9671a42e4508db8a0196110b098fd8550304ab14.zip
net: fec: fix ethtool set_pauseparam duplex bug
Setting the pause parameters causes a running network interface to be restarted. However, the restart forces the FEC into half-duplex mode, whether or not the remote end is in half-duplex mode. Misconfigured duplex mode is a known source of problems on a link. Fix this by always preserving the duplex mode on configuration changes. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a91fe68030e6..045ea71f2b59 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1897,7 +1897,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
phy_start_aneg(fep->phy_dev);
}
if (netif_running(ndev))
- fec_restart(ndev, 0);
+ fec_restart(ndev, fep->full_duplex);
return 0;
}