[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <dafb5f50-dc45-42a6-b410-dc858899972e@US01WEHTC1.internal.synopsys.com>
Date: Mon, 10 Jul 2017 17:38:11 +0400
From: Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To: John Youn <John.Youn@...opsys.com>,
Felipe Balbi <balbi@...nel.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
Subject: [PATCH] usb: dwc2: gadget: On disconnect reset device address to zero
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@...opsys.com>
---
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
Powered by blists - more mailing lists