Commit 699412d9 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: net22xx: fix ->disconnect reporting

with the latest udc_start/udc_stop conversion,
too much code was deleted which ended up creating
a regression in net2272 and net2280 drivers.

To fix the regression we revert one hunk of the
original commits.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 06d9db72
...@@ -1495,6 +1495,13 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver) ...@@ -1495,6 +1495,13 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver)
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
net2272_dequeue_all(&dev->ep[i]); net2272_dequeue_all(&dev->ep[i]);
/* report disconnect; the driver is already quiesced */
if (driver) {
spin_unlock(&dev->lock);
driver->disconnect(&dev->gadget);
spin_lock(&dev->lock);
}
net2272_usb_reinit(dev); net2272_usb_reinit(dev);
} }
......
...@@ -1946,6 +1946,13 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver) ...@@ -1946,6 +1946,13 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
nuke (&dev->ep [i]); nuke (&dev->ep [i]);
/* report disconnect; the driver is already quiesced */
if (driver) {
spin_unlock(&dev->lock);
driver->disconnect(&dev->gadget);
spin_lock(&dev->lock);
}
usb_reinit (dev); usb_reinit (dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment