Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15695
b: refs/heads/master
c: 9a7ae0a
h: refs/heads/master
i:
  15693: 7071a37
  15691: b6b2a01
  15687: 4e3a7c6
  15679: 3654aa1
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Sep 28, 2005
1 parent dea2cc0 commit a445817
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 724bca3ca4d2126b67dd62e64d3f97805f9672de
refs/heads/master: 9a7ae0a978263adb7d6b630f0c3c37c0133325e0
19 changes: 19 additions & 0 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2300,6 +2300,24 @@ static u32 sky2_get_msglevel(struct net_device *netdev)
return sky2->msg_enable;
}

static int sky2_nway_reset(struct net_device *dev)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;

if (sky2->autoneg != AUTONEG_ENABLE)
return -EINVAL;

netif_stop_queue(dev);

spin_lock_irq(&hw->phy_lock);
sky2_phy_reset(hw, sky2->port);
sky2_phy_init(hw, sky2->port);
spin_unlock_irq(&hw->phy_lock);

return 0;
}

static void sky2_phy_stats(struct sky2_port *sky2, u64 * data, unsigned count)
{
struct sky2_hw *hw = sky2->hw;
Expand Down Expand Up @@ -2656,6 +2674,7 @@ static struct ethtool_ops sky2_ethtool_ops = {
.get_drvinfo = sky2_get_drvinfo,
.get_msglevel = sky2_get_msglevel,
.set_msglevel = sky2_set_msglevel,
.nway_reset = sky2_nway_reset,
.get_regs_len = sky2_get_regs_len,
.get_regs = sky2_get_regs,
.get_link = ethtool_op_get_link,
Expand Down

0 comments on commit a445817

Please sign in to comment.