Skip to content

Commit

Permalink
firewire net: Release broadcast/fifo resources on ifdown.
Browse files Browse the repository at this point in the history
Since those resources are allocated on ifup, relsase them on ifdown.

Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
  • Loading branch information
yoshfuji authored and Stefan Richter committed Mar 13, 2013
1 parent 111534c commit 8559e7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,9 +1295,12 @@ static int fwnet_open(struct net_device *net)
/* ifdown */
static int fwnet_stop(struct net_device *net)
{
struct fwnet_device *dev = netdev_priv(net);

netif_stop_queue(net);

/* Deallocate iso context for use by other applications? */
fwnet_broadcast_stop(dev);
fwnet_fifo_stop(dev);

return 0;
}
Expand Down Expand Up @@ -1638,9 +1641,6 @@ static int fwnet_remove(struct device *_dev)
if (list_empty(&dev->peer_list)) {
unregister_netdev(net);

fwnet_fifo_stop(dev);
fwnet_broadcast_stop(dev);

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

0 comments on commit 8559e7f

Please sign in to comment.