aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Chen <[email protected]>2022-10-05 12:13:55 -0700
committerGreg Kroah-Hartman <[email protected]>2022-10-22 12:51:53 +0200
commitfb8f60dd1b67520e0e0d7978ef17d015690acfc1 (patch)
tree0695deacbafe7a4933914381f291e195b1fb48aa
parent4e3a50293c2b21961f02e1afa2f17d3a1a90c7c8 (diff)
usb: bdc: change state when port disconnected
When port is connected and then disconnected, the state stays as configured. Which is incorrect as the port is no longer configured, but in a not attached state. Signed-off-by: Justin Chen <[email protected]> Acked-by: Florian Fainelli <[email protected]> Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_udc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_udc.c b/drivers/usb/gadget/udc/bdc/bdc_udc.c
index 5ac0ef88334e..53ffaf4e2e37 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_udc.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_udc.c
@@ -151,6 +151,7 @@ static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit)
bdc->delayed_status = false;
bdc->reinit = reinit;
bdc->test_mode = false;
+ usb_gadget_set_state(&bdc->gadget, USB_STATE_NOTATTACHED);
}
/* TNotify wkaeup timer */