Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
[cascardo/linux.git] / drivers / usb / gadget / u_ether.c
index fe0880d..97b0277 100644 (file)
@@ -793,7 +793,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g,
 
        net->netdev_ops = &eth_netdev_ops;
 
-       SET_ETHTOOL_OPS(net, &ops);
+       net->ethtool_ops = &ops;
 
        dev->gadget = g;
        SET_NETDEV_DEV(net, &g->dev);
@@ -850,7 +850,7 @@ struct net_device *gether_setup_name_default(const char *netname)
 
        net->netdev_ops = &eth_netdev_ops;
 
-       SET_ETHTOOL_OPS(net, &ops);
+       net->ethtool_ops = &ops;
        SET_NETDEV_DEVTYPE(net, &gadget_type);
 
        return net;
@@ -1120,7 +1120,10 @@ void gether_disconnect(struct gether *link)
 
        DBG(dev, "%s\n", __func__);
 
+       netif_tx_lock(dev->net);
        netif_stop_queue(dev->net);
+       netif_tx_unlock(dev->net);
+
        netif_carrier_off(dev->net);
 
        /* disable endpoints, forcing (synchronous) completion