aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-09-27 18:28:42 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-28 11:52:58 -0400
commit9a7ae0a978263adb7d6b630f0c3c37c0133325e0 (patch)
tree2f6052964a9f1fe0e8d358911ce663903f388d31 /drivers/net/sky2.c
parent724bca3ca4d2126b67dd62e64d3f97805f9672de (diff)
[PATCH] sky2: nway reset (BONUS FEATURE)
Here is support for ethtool controlled renegotiation. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c19
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
2303static 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
2303static void sky2_phy_stats(struct sky2_port *sky2, u64 * data, unsigned count) 2321static 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,