Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751397AbdGRDYB convert rfc822-to-8bit (ORCPT ); Mon, 17 Jul 2017 23:24:01 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:43486 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdGRDX7 (ORCPT ); Mon, 17 Jul 2017 23:23:59 -0400 From: John Youn To: Minas Harutyunyan , Felipe Balbi , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb: dwc2: gadget: On USB RESET reset device address to zero Thread-Topic: [PATCH] usb: dwc2: gadget: On USB RESET reset device address to zero Thread-Index: AQHS+jAIkSVjBwLgZUWIFTYEfxVqZA== Date: Tue, 18 Jul 2017 03:23:58 +0000 Message-ID: <2B3535C5ECE8B5419E3ECBE300772909021B570A8D@US01WEMBX2.internal.synopsys.com> References: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.186.99] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 32 On 07/11/2017 03:25 AM, Minas Harutyunyan wrote: > Reseted DEVADDR field in DCFG to zero on USB RESET. > > Device address in DCFG register does not reset to zero, > which required to pass enumeration, after disconnect and > reconnect. > > Signed-off-by: Minas Harutyunyan > --- > 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..c5c0a26a4d66 100644 > --- a/drivers/usb/dwc2/gadget.c > +++ b/drivers/usb/dwc2/gadget.c > @@ -3561,6 +3561,9 @@ static irqreturn_t dwc2_hsotg_irq(int irq, void *pw) > /* Report disconnection if it is not already done. */ > dwc2_hsotg_disconnect(hsotg); > > + /* Reset device address to zero */ > + __bic32(hsotg->regs + DCFG, DCFG_DEVADDR_MASK); > + > if (usb_status & GOTGCTL_BSESVLD && connected) > dwc2_hsotg_core_init_disconnected(hsotg, true); > } > Acked-by: John Youn John