diff options
author | Felipe Balbi <balbi@ti.com> | 2014-10-10 20:24:00 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 16:01:00 (GMT) |
commit | 06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9 (patch) | |
tree | 20ca3b02df17498be571b55af44533a0ac6fef92 /drivers/usb/dwc3 | |
parent | f2918ad89df5a5deb4773e13b5f6e21eabfce282 (diff) | |
download | linux-06a374ed13fdb7c6b2edd8cbdcf52bd1b0cc67b9.tar.xz |
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')
-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 748b87b..12f4284 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) |