diff options
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 64309f4e8b19..997ea2a3d53f 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/ethtool.h> | 12 | #include <linux/ethtool.h> |
13 | #include <linux/mdio.h> | ||
13 | #include <linux/rtnetlink.h> | 14 | #include <linux/rtnetlink.h> |
14 | #include "net_driver.h" | 15 | #include "net_driver.h" |
15 | #include "workarounds.h" | 16 | #include "workarounds.h" |
@@ -345,8 +346,8 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx, | |||
345 | unsigned int n = 0, i; | 346 | unsigned int n = 0, i; |
346 | enum efx_loopback_mode mode; | 347 | enum efx_loopback_mode mode; |
347 | 348 | ||
348 | efx_fill_test(n++, strings, data, &tests->mii, | 349 | efx_fill_test(n++, strings, data, &tests->mdio, |
349 | "core", 0, "mii", NULL); | 350 | "core", 0, "mdio", NULL); |
350 | efx_fill_test(n++, strings, data, &tests->nvram, | 351 | efx_fill_test(n++, strings, data, &tests->nvram, |
351 | "core", 0, "nvram", NULL); | 352 | "core", 0, "nvram", NULL); |
352 | efx_fill_test(n++, strings, data, &tests->interrupt, | 353 | efx_fill_test(n++, strings, data, &tests->interrupt, |
@@ -529,14 +530,7 @@ static int efx_ethtool_nway_reset(struct net_device *net_dev) | |||
529 | { | 530 | { |
530 | struct efx_nic *efx = netdev_priv(net_dev); | 531 | struct efx_nic *efx = netdev_priv(net_dev); |
531 | 532 | ||
532 | if (efx->phy_op->mmds & DEV_PRESENT_BIT(MDIO_MMD_AN)) { | 533 | return mdio45_nway_restart(&efx->mdio); |
533 | mdio_clause45_set_flag(efx, efx->mii.phy_id, MDIO_MMD_AN, | ||
534 | MDIO_MMDREG_CTRL1, | ||
535 | __ffs(BMCR_ANRESTART), true); | ||
536 | return 0; | ||
537 | } | ||
538 | |||
539 | return -EOPNOTSUPP; | ||
540 | } | 534 | } |
541 | 535 | ||
542 | static u32 efx_ethtool_get_link(struct net_device *net_dev) | 536 | static u32 efx_ethtool_get_link(struct net_device *net_dev) |
@@ -689,7 +683,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev, | |||
689 | return -EINVAL; | 683 | return -EINVAL; |
690 | } | 684 | } |
691 | 685 | ||
692 | if (!(efx->phy_op->mmds & DEV_PRESENT_BIT(MDIO_MMD_AN)) && | 686 | if (!(efx->phy_op->mmds & MDIO_DEVS_AN) && |
693 | (wanted_fc & EFX_FC_AUTO)) { | 687 | (wanted_fc & EFX_FC_AUTO)) { |
694 | EFX_LOG(efx, "PHY does not support flow control " | 688 | EFX_LOG(efx, "PHY does not support flow control " |
695 | "autonegotiation\n"); | 689 | "autonegotiation\n"); |
@@ -717,7 +711,8 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev, | |||
717 | mutex_lock(&efx->mac_lock); | 711 | mutex_lock(&efx->mac_lock); |
718 | 712 | ||
719 | efx->wanted_fc = wanted_fc; | 713 | efx->wanted_fc = wanted_fc; |
720 | mdio_clause45_set_pause(efx); | 714 | if (efx->phy_op->mmds & MDIO_DEVS_AN) |
715 | mdio45_ethtool_spauseparam_an(&efx->mdio, pause); | ||
721 | __efx_reconfigure_port(efx); | 716 | __efx_reconfigure_port(efx); |
722 | 717 | ||
723 | mutex_unlock(&efx->mac_lock); | 718 | mutex_unlock(&efx->mac_lock); |