Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184038
b: refs/heads/master
c: f2b31cb
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and David S. Miller committed Feb 13, 2010
1 parent bd00011 commit 36fe0ab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea0f71e59c20ea1e413cacfc971e051b3d6c6f64
refs/heads/master: f2b31cb3ae491f9e82443cf25cc5a9ebdbc63619
28 changes: 17 additions & 11 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1908,21 +1908,12 @@ static void sky2_tx_reset(struct sky2_hw *hw, unsigned port)
sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
}

/* Network shutdown */
static int sky2_down(struct net_device *dev)
static void sky2_hw_down(struct sky2_port *sky2)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port;
u16 ctrl;
u32 imask;

/* Never really got started! */
if (!sky2->tx_le)
return 0;

if (netif_msg_ifdown(sky2))
printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
u16 ctrl;

/* Force flow control off */
sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);
Expand Down Expand Up @@ -1972,6 +1963,21 @@ static int sky2_down(struct net_device *dev)

/* Free any pending frames stuck in HW queue */
sky2_tx_complete(sky2, sky2->tx_prod);
}

/* Network shutdown */
static int sky2_down(struct net_device *dev)
{
struct sky2_port *sky2 = netdev_priv(dev);

/* Never really got started! */
if (!sky2->tx_le)
return 0;

if (netif_msg_ifdown(sky2))
printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);

sky2_hw_down(sky2);

sky2_free_buffers(sky2);

Expand Down

0 comments on commit 36fe0ab

Please sign in to comment.