diff options
Diffstat (limited to 'drivers/usb/gadget/u_ether.c')
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 90e82e288eb9..0e5230926154 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -669,6 +669,8 @@ static int eth_stop(struct net_device *net) | |||
669 | spin_lock_irqsave(&dev->lock, flags); | 669 | spin_lock_irqsave(&dev->lock, flags); |
670 | if (dev->port_usb) { | 670 | if (dev->port_usb) { |
671 | struct gether *link = dev->port_usb; | 671 | struct gether *link = dev->port_usb; |
672 | const struct usb_endpoint_descriptor *in; | ||
673 | const struct usb_endpoint_descriptor *out; | ||
672 | 674 | ||
673 | if (link->close) | 675 | if (link->close) |
674 | link->close(link); | 676 | link->close(link); |
@@ -682,10 +684,14 @@ static int eth_stop(struct net_device *net) | |||
682 | * their own pace; the network stack can handle old packets. | 684 | * their own pace; the network stack can handle old packets. |
683 | * For the moment we leave this here, since it works. | 685 | * For the moment we leave this here, since it works. |
684 | */ | 686 | */ |
687 | in = link->in_ep->desc; | ||
688 | out = link->out_ep->desc; | ||
685 | usb_ep_disable(link->in_ep); | 689 | usb_ep_disable(link->in_ep); |
686 | usb_ep_disable(link->out_ep); | 690 | usb_ep_disable(link->out_ep); |
687 | if (netif_carrier_ok(net)) { | 691 | if (netif_carrier_ok(net)) { |
688 | DBG(dev, "host still using in/out endpoints\n"); | 692 | DBG(dev, "host still using in/out endpoints\n"); |
693 | link->in_ep->desc = in; | ||
694 | link->out_ep->desc = out; | ||
689 | usb_ep_enable(link->in_ep); | 695 | usb_ep_enable(link->in_ep); |
690 | usb_ep_enable(link->out_ep); | 696 | usb_ep_enable(link->out_ep); |
691 | } | 697 | } |