diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-03-04 09:51:12 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-05 01:40:20 (GMT) |
commit | ca83db369c1c633142c08dd0bfafca6ac4247c63 (patch) | |
tree | d927caa3ecc9f55bff5bacf0cbcce332fe2b6198 | |
parent | 0c5c2d3089068d4aa378f7a40d2b5ad9d4f52ce8 (diff) | |
download | linux-fsl-qoriq-ca83db369c1c633142c08dd0bfafca6ac4247c63.tar.xz |
sfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registers
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/sfc/ethtool.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 7b5924c0..589d132 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c @@ -529,7 +529,14 @@ static int efx_ethtool_nway_reset(struct net_device *net_dev) { struct efx_nic *efx = netdev_priv(net_dev); - return mii_nway_restart(&efx->mii); + if (efx->phy_op->mmds & DEV_PRESENT_BIT(MDIO_MMD_AN)) { + mdio_clause45_set_flag(efx, efx->mii.phy_id, MDIO_MMD_AN, + MDIO_MMDREG_CTRL1, + __ffs(BMCR_ANRESTART), true); + return 0; + } + + return -EOPNOTSUPP; } static u32 efx_ethtool_get_link(struct net_device *net_dev) |