Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966161AbbLPQ6I (ORCPT ); Wed, 16 Dec 2015 11:58:08 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:50922 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966138AbbLPQ6F (ORCPT ); Wed, 16 Dec 2015 11:58:05 -0500 From: Felipe Balbi To: , CC: , , , "Du, Changbin" Subject: Re: [PATCH] usb: dwc2: fix transfer stop programming for out endpoint In-Reply-To: <1449214703-30795-1-git-send-email-changbin.du@intel.com> References: <1449214703-30795-1-git-send-email-changbin.du@intel.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 16 Dec 2015 10:57:59 -0600 Message-ID: <8760zyfi08.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3015 Lines: 92 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, changbin.du@intel.com writes: > From: "Du, Changbin" > > To stop an out endpoint, software should set sets the Global OUT NAK, > but not the Global Non-periodic IN NAK. This driver bug leads the out-ep > failed be in disabled state with below error. > > dwc2_hsotg_ep_stop_xfr: timeout DOEPCTL.EPDisable > > Signed-off-by: Du, Changbin John, is this patch okay to apply ? > --- > drivers/usb/dwc2/gadget.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c > index 0abf73c..92a182f 100644 > --- a/drivers/usb/dwc2/gadget.c > +++ b/drivers/usb/dwc2/gadget.c > @@ -2911,15 +2911,15 @@ static void dwc2_hsotg_ep_stop_xfr(struct dwc2_hs= otg *hsotg, > "%s: timeout DIEPINT.NAKEFF\n", __func__); > } else { > /* Clear any pending nak effect interrupt */ > - dwc2_writel(GINTSTS_GINNAKEFF, hsotg->regs + GINTSTS); > + dwc2_writel(GINTSTS_GOUTNAKEFF, hsotg->regs + GINTSTS); >=20=20 > - __orr32(hsotg->regs + DCTL, DCTL_SGNPINNAK); > + __orr32(hsotg->regs + DCTL, DCTL_SGOUTNAK); >=20=20 > /* Wait for global nak to take effect */ > if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS, > - GINTSTS_GINNAKEFF, 100)) > + GINTSTS_GOUTNAKEFF, 100)) > dev_warn(hsotg->dev, > - "%s: timeout GINTSTS.GINNAKEFF\n", __func__); > + "%s: timeout GINTSTS.GOUTNAKEFF\n", __func__); > } >=20=20 > /* Disable ep */ > @@ -2944,7 +2944,7 @@ static void dwc2_hsotg_ep_stop_xfr(struct dwc2_hsot= g *hsotg, > /* TODO: Flush shared tx fifo */ > } else { > /* Remove global NAKs */ > - __bic32(hsotg->regs + DCTL, DCTL_SGNPINNAK); > + __bic32(hsotg->regs + DCTL, DCTL_SGOUTNAK); > } > } >=20=20 > --=20 > 2.5.0 > =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWcZgZAAoJEIaOsuA1yqREvrQQAJlz80JFMeFpsBlVo9ufkAy4 cDb73IZ8e344WrBIH6o6SqK6hONRXQqA9X4DclKCXqiSDb+rFPj0SH6GUEtLWCTr 8ekx3aodphWXqEJHr1azA+U49IharcA+hSmpjiQSEGWXpmuo3zbnnMOAoTLvS1oY KoVaNHxv432xEvtaU8jgtY01kug/oxgLHzimAPntXX039FtYfaFpO9o+FDmV1Rso k+1kvZBRCPklX7uIsLIZ6inA2RMAJBXQovm9HFUz+ZBYbBXgSae2CXpWn34PFy1m E32/Wrlxk8hvpA8Ofeme5jd0Bl1nsU8fAfVfmgt/En7VBumJ0crASxxvP2itnRSt fU/f3nz5Qe9ikX04GVi2XkOcmbK/Nd1TMN49yaUio7P5MmW447DbClLquaUEwJOR vuNzG5qxe4S8WOkPdDFC0RaN96UpLAl7kMq8jux3k2AlNWx25hmvbMfw8aZlvQCt z0UuroCjMEUMGxOX7wxSuVodmNvxrGKGGxXZfeOMzwbnfWld3yU8fZyk5WIxXT6D Q2oP8VeCXC4q6hTLQnSz0d+OkWP2ELv4VKIdcReSI+Zuah3j+vfRqy/H2NxmLrWP CGxDa6LJapui1XRXKL963MCTutE3WuM8f8GmdvaJ0MsRfi1+Mz1JdT2lY1qirUN8 f71+C4p72BqjpkBtQXHO =krs1 -----END PGP SIGNATURE----- --=-=-=-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/