Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195085
b: refs/heads/master
c: d72ff8f
h: refs/heads/master
i:
  195083: 1d70e14
v: v3
  • Loading branch information
Mike McCormack authored and David S. Miller committed May 14, 2010
1 parent e8f0848 commit 046fafe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 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: 93135a3be0d909fabca9c4329177f71ae71b6847
refs/heads/master: d72ff8fa7f8b344382963721f842256825c4660b
26 changes: 19 additions & 7 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3312,15 +3312,11 @@ static int sky2_reattach(struct net_device *dev)
return err;
}

static void sky2_restart(struct work_struct *work)
static void sky2_all_down(struct sky2_hw *hw)
{
struct sky2_hw *hw = container_of(work, struct sky2_hw, restart_work);
u32 imask;
int i;

rtnl_lock();

imask = sky2_read32(hw, B0_IMSK);
sky2_read32(hw, B0_IMSK);
sky2_write32(hw, B0_IMSK, 0);
synchronize_irq(hw->pdev->irq);
napi_disable(&hw->napi);
Expand All @@ -3336,8 +3332,12 @@ static void sky2_restart(struct work_struct *work)
netif_tx_disable(dev);
sky2_hw_down(sky2);
}
}

sky2_reset(hw);
static void sky2_all_up(struct sky2_hw *hw)
{
u32 imask = Y2_IS_BASE;
int i;

for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
Expand All @@ -3348,6 +3348,7 @@ static void sky2_restart(struct work_struct *work)

sky2_hw_up(sky2);
sky2_set_multicast(dev);
imask |= portirq_msk[i];
netif_wake_queue(dev);
}

Expand All @@ -3356,6 +3357,17 @@ static void sky2_restart(struct work_struct *work)

sky2_read32(hw, B0_Y2_SP_LISR);
napi_enable(&hw->napi);
}

static void sky2_restart(struct work_struct *work)
{
struct sky2_hw *hw = container_of(work, struct sky2_hw, restart_work);

rtnl_lock();

sky2_all_down(hw);
sky2_reset(hw);
sky2_all_up(hw);

rtnl_unlock();
}
Expand Down

0 comments on commit 046fafe

Please sign in to comment.