Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2122
b: refs/heads/master
c: 8551cb9
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Jeff Garzik committed May 15, 2005
1 parent 64c020d commit 9823800
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: d0e3e87ff4516d1b9d7bc6734a99168838f79635
refs/heads/master: 8551cb980086eb9952387a9f135d6f96af3b82ee
20 changes: 12 additions & 8 deletions trunk/drivers/net/wireless/orinoco.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ static void orinoco_reset(struct net_device *dev)
{
struct orinoco_private *priv = netdev_priv(dev);
struct hermes *hw = &priv->hw;
int err = 0;
int err;
unsigned long flags;

if (orinoco_lock(priv, &flags) != 0)
Expand All @@ -1941,20 +1941,20 @@ static void orinoco_reset(struct net_device *dev)

orinoco_unlock(priv, &flags);

if (priv->hard_reset)
if (priv->hard_reset) {
err = (*priv->hard_reset)(priv);
if (err) {
printk(KERN_ERR "%s: orinoco_reset: Error %d "
"performing hard reset\n", dev->name, err);
/* FIXME: shutdown of some sort */
return;
if (err) {
printk(KERN_ERR "%s: orinoco_reset: Error %d "
"performing hard reset\n", dev->name, err);
goto disable;
}
}

err = orinoco_reinit_firmware(dev);
if (err) {
printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n",
dev->name, err);
return;
goto disable;
}

spin_lock_irq(&priv->lock); /* This has to be called from user context */
Expand All @@ -1975,6 +1975,10 @@ static void orinoco_reset(struct net_device *dev)
spin_unlock_irq(&priv->lock);

return;
disable:
hermes_set_irqmask(hw, 0);
netif_device_detach(dev);
printk(KERN_ERR "%s: Device has been disabled!\n", dev->name);
}

/********************************************************************/
Expand Down

0 comments on commit 9823800

Please sign in to comment.