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);
spin_unlock_irq(&dev->lock);
return 0;
-out:
- fwnet_fifo_stop(dev);
- return ret;
}
/* ifdown */
struct fwnet_device *dev = netdev_priv(net);
netif_stop_queue(net);
-
fwnet_broadcast_stop(dev);
- fwnet_fifo_stop(dev);
return 0;
}
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
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);
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);