USB CV driver stack doesn't perform USB RESET after device disconnect/ connect, so need to reset to zero DEVADDR field in DCFG to pass enumeration again. Signed-off-by: Minas Harutyunyan <hminas@xxxxxxxxxxxx> --- drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 98a4a79e7f6e..deb3d901b99d 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3174,6 +3174,9 @@ void dwc2_hsotg_disconnect(struct dwc2_hsotg *hsotg) return; hsotg->connected = 0; + /* On disconnect reset device address to zero */ + __bic32(hsotg->regs + DCFG, DCFG_DEVADDR_MASK); + hsotg->test_mode = 0; for (ep = 0; ep < hsotg->num_of_eps; ep++) { -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html