usb: bdc: change state when port disconnected
commitfb8f60dd1bupstream. 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:efed421a94("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e440957f9c
commit
2bc4f99ee2
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user