diff options
author | Felipe Balbi <balbi@ti.com> | 2014-10-10 15:24:00 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 10:01:00 -0600 |
commit | 06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9 (patch) | |
tree | 20ca3b02df17498be571b55af44533a0ac6fef92 /drivers/usb/dwc3/gadget.c | |
parent | f2918ad89df5a5deb4773e13b5f6e21eabfce282 (diff) | |
download | linux-stable-06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9.tar.gz linux-stable-06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9.tar.bz2 linux-stable-06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9.zip |
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
whenever we get a Disconnect Interrupt, we should
make sure to update out udc state to NOT_ATTACHED,
otherwise sysfs will show wrong values.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 748b87b3f98a..12f42842da10 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2140,6 +2140,7 @@ static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc) dwc->gadget.speed = USB_SPEED_UNKNOWN; dwc->setup_packet_pending = false; + usb_gadget_set_state(&dwc->gadget, USB_STATE_NOTATTACHED); } static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc) |