From: YOSHIFUJI Hideaki Date: Fri, 8 Mar 2013 01:45:57 +0000 (+0900) Subject: firewire net: Release broadcast/fifo resources on ifdown. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8559e7f0694e3fb192aab00a495be5a510afc8c3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git firewire net: Release broadcast/fifo resources on ifdown. Since those resources are allocated on ifup, relsase them on ifdown. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Stefan Richter --- diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index ca41446d62f4..c1898adeb900 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -1295,9 +1295,12 @@ out: /* 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; } @@ -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);