Skip to content

Commit fb8f60d

Browse files
Ryceancurrygregkh
authored andcommitted
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 <justinpopo6@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Fixes: efed421 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Cc: stable <stable@kernel.org> Link: https://lore.kernel.org/r/1664997235-18198-1-git-send-email-justinpopo6@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e3a502 commit fb8f60d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/udc/bdc/bdc_udc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit)
151151
bdc->delayed_status = false;
152152
bdc->reinit = reinit;
153153
bdc->test_mode = false;
154+
usb_gadget_set_state(&bdc->gadget, USB_STATE_NOTATTACHED);
154155
}
155156

156157
/* TNotify wkaeup timer */

0 commit comments

Comments
 (0)