Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368673
b: refs/heads/master
c: 382c4b4
h: refs/heads/master
i:
  368671: f563e24
v: v3
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Mar 26, 2013
1 parent 5c7a831 commit e710e63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 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: 021b97e469714b31b9e808c91b49543a8766c342
refs/heads/master: 382c4b4090b7394d079c199ba053a378c6cd45b8
22 changes: 10 additions & 12 deletions trunk/drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,13 +1286,9 @@ static int fwnet_open(struct net_device *net)
struct fwnet_device *dev = netdev_priv(net);
int ret;

ret = fwnet_fifo_start(dev);
if (ret)
return ret;

ret = fwnet_broadcast_start(dev);
if (ret)
goto out;
return ret;

netif_start_queue(net);

Expand All @@ -1301,9 +1297,6 @@ static int fwnet_open(struct net_device *net)
spin_unlock_irq(&dev->lock);

return 0;
out:
fwnet_fifo_stop(dev);
return ret;
}

/* ifdown */
Expand All @@ -1312,9 +1305,7 @@ static int fwnet_stop(struct net_device *net)
struct fwnet_device *dev = netdev_priv(net);

netif_stop_queue(net);

fwnet_broadcast_stop(dev);
fwnet_fifo_stop(dev);

return 0;
}
Expand Down Expand Up @@ -1593,6 +1584,11 @@ static int fwnet_probe(struct device *_dev)
dev->card = card;
dev->netdev = net;

ret = fwnet_fifo_start(dev);
if (ret < 0)
goto out;
dev->local_fifo = dev->handler.offset;

/*
* Use the RFC 2734 default 1500 octets or the maximum payload
* as initial MTU
Expand All @@ -1616,10 +1612,10 @@ static int fwnet_probe(struct device *_dev)
if (ret && allocated_netdev) {
unregister_netdev(net);
list_del(&dev->dev_link);
}
out:
if (ret && allocated_netdev)
fwnet_fifo_stop(dev);
free_netdev(net);
}

mutex_unlock(&fwnet_device_mutex);

Expand Down Expand Up @@ -1660,6 +1656,8 @@ static int fwnet_remove(struct device *_dev)
if (list_empty(&dev->peer_list)) {
unregister_netdev(net);

fwnet_fifo_stop(dev);

for (i = 0; dev->queued_datagrams && i < 5; i++)
ssleep(1);
WARN_ON(dev->queued_datagrams);
Expand Down

0 comments on commit e710e63

Please sign in to comment.