Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256480
b: refs/heads/master
c: cd63401
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 16, 2011
1 parent 5d24490 commit 3b65dda
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 25009a1ae1171eda6bff44b7e44eb0e076713811
refs/heads/master: cd6340199f65cad63262db0fd561bdcfd69df3bd
13 changes: 10 additions & 3 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6342,6 +6342,7 @@ static void
bnx2_reset_task(struct work_struct *work)
{
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
int rc;

rtnl_lock();
if (!netif_running(bp->dev)) {
Expand All @@ -6351,7 +6352,14 @@ bnx2_reset_task(struct work_struct *work)

bnx2_netif_stop(bp, true);

bnx2_init_nic(bp, 1);
rc = bnx2_init_nic(bp, 1);
if (rc) {
netdev_err(bp->dev, "failed to reset NIC, closing\n");
bnx2_napi_enable(bp);
dev_close(bp->dev);
rtnl_unlock();
return;
}

atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp, true);
Expand Down Expand Up @@ -6573,8 +6581,6 @@ bnx2_close(struct net_device *dev)
{
struct bnx2 *bp = netdev_priv(dev);

cancel_work_sync(&bp->reset_task);

bnx2_disable_int_sync(bp);
bnx2_napi_disable(bp);
del_timer_sync(&bp->timer);
Expand Down Expand Up @@ -8404,6 +8410,7 @@ bnx2_remove_one(struct pci_dev *pdev)
unregister_netdev(dev);

del_timer_sync(&bp->timer);
cancel_work_sync(&bp->reset_task);

if (bp->mips_firmware)
release_firmware(bp->mips_firmware);
Expand Down

0 comments on commit 3b65dda

Please sign in to comment.