aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/u_ether.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index dbd575a194f3..66948b72bb9b 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -873,6 +873,13 @@ struct net_device *gether_connect(struct gether *link)
873 spin_lock(&dev->lock); 873 spin_lock(&dev->lock);
874 dev->port_usb = link; 874 dev->port_usb = link;
875 link->ioport = dev; 875 link->ioport = dev;
876 if (netif_running(dev->net)) {
877 if (link->open)
878 link->open(link);
879 } else {
880 if (link->close)
881 link->close(link);
882 }
876 spin_unlock(&dev->lock); 883 spin_unlock(&dev->lock);
877 884
878 netif_carrier_on(dev->net); 885 netif_carrier_on(dev->net);