diff options
-rw-r--r-- | drivers/net/sky2.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a6c7bb9cea0d..57583fa86a9b 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2300,6 +2300,24 @@ static u32 sky2_get_msglevel(struct net_device *netdev) | |||
2300 | return sky2->msg_enable; | 2300 | return sky2->msg_enable; |
2301 | } | 2301 | } |
2302 | 2302 | ||
2303 | static int sky2_nway_reset(struct net_device *dev) | ||
2304 | { | ||
2305 | struct sky2_port *sky2 = netdev_priv(dev); | ||
2306 | struct sky2_hw *hw = sky2->hw; | ||
2307 | |||
2308 | if (sky2->autoneg != AUTONEG_ENABLE) | ||
2309 | return -EINVAL; | ||
2310 | |||
2311 | netif_stop_queue(dev); | ||
2312 | |||
2313 | spin_lock_irq(&hw->phy_lock); | ||
2314 | sky2_phy_reset(hw, sky2->port); | ||
2315 | sky2_phy_init(hw, sky2->port); | ||
2316 | spin_unlock_irq(&hw->phy_lock); | ||
2317 | |||
2318 | return 0; | ||
2319 | } | ||
2320 | |||
2303 | static void sky2_phy_stats(struct sky2_port *sky2, u64 * data, unsigned count) | 2321 | static void sky2_phy_stats(struct sky2_port *sky2, u64 * data, unsigned count) |
2304 | { | 2322 | { |
2305 | struct sky2_hw *hw = sky2->hw; | 2323 | struct sky2_hw *hw = sky2->hw; |
@@ -2656,6 +2674,7 @@ static struct ethtool_ops sky2_ethtool_ops = { | |||
2656 | .get_drvinfo = sky2_get_drvinfo, | 2674 | .get_drvinfo = sky2_get_drvinfo, |
2657 | .get_msglevel = sky2_get_msglevel, | 2675 | .get_msglevel = sky2_get_msglevel, |
2658 | .set_msglevel = sky2_set_msglevel, | 2676 | .set_msglevel = sky2_set_msglevel, |
2677 | .nway_reset = sky2_nway_reset, | ||
2659 | .get_regs_len = sky2_get_regs_len, | 2678 | .get_regs_len = sky2_get_regs_len, |
2660 | .get_regs = sky2_get_regs, | 2679 | .get_regs = sky2_get_regs, |
2661 | .get_link = ethtool_op_get_link, | 2680 | .get_link = ethtool_op_get_link, |