From nobody Tue Jul 05 01:03:09 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DDEF51D11F1C; Tue, 5 Jul 2022 01:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LcPYT5sKnz4ctC; Tue, 5 Jul 2022 01:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656982989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZLAIO0K5jFUd0mEva+PxOPzD9O0hkXQOJflBB2+WMg=; b=cLFdtdUM9S81HDwGVBCNMMOdwFcAJr9DNNhMnWFg6YUQDtTvS7GhoA3r2z5osXSuIh9otF KL+ncmjvza1f+0xwdBaMMj+qKQhM5RQXCDgSxKndmgdftzbHmA9QIlizG43+TQA8YLEFsM vbCHLxeKAGVDr4j+rLo6lxufrckwFiqRzklalpSBv78SiIzoECAd/GRsNJ93c/qEmqhnP8 VmHg/V5BB/EmO1velB/jp+ibKSGMRSQjDw8FQF1Kgsd64hVdTqGu/krpHMbhpZ5EjSUNFN zsNM3CrFtTfKyYmwL4JzM2Fa5Ozc8l1fxsHqmH2mFZWnF9f+XwOaKheevbiJwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A900C1BA60; Tue, 5 Jul 2022 01:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 265139IL032986; Tue, 5 Jul 2022 01:03:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 265139gq032985; Tue, 5 Jul 2022 01:03:09 GMT (envelope-from git) Date: Tue, 5 Jul 2022 01:03:09 GMT Message-Id: <202207050103.265139gq032985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ec32fc2af525 - main - dwc3: fix from not working List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec32fc2af52530e49d8a522ae29bf20b2e57603b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656982989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZLAIO0K5jFUd0mEva+PxOPzD9O0hkXQOJflBB2+WMg=; b=o4RtRjWTXzouchYXouTY7uhmp65BKieVVjdUNK8Bg3rIOcvhtw9F+MIXywzn5kyAEqe7tq Xzc6Hf5l+N265nYZbmNbS0N7oEEpzu8Lg76TXYkeW3zAaBIdd2BnNYzzhRp5ncHjom1kPl K2Z2A/LSngb6h6A2r1+KJ3PmI5ELCpoVGvgslLu8BqYQJTR+B9asFTB9ODVeE/Ztsm7aC5 zMXELHNVhcMKaEFvgMLuH4CFe9LJ2fZbu4ZslHIpgEJG01VewM9qZOovcVQ8I8MZjBrPuO JoMR1z0kAIIQQcKH8AEQ8fvEvjmEuwA/gyrk7bxAOS24sZcd71nG8vFnHXNS6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656982989; a=rsa-sha256; cv=none; b=GA5kZ44dRxB8edvAHOOXU6IYhG5CbmBQ81D2H+/hrZATtE0hn86jJVKfBaV1WTA/nI6hVr GX8uceo6BrlCiCZScV1lnUgiryHL9j4ituMXv6o0g29eSbbkBaqtnMtIudIK/qWC0rkkyI 2AHojlWsqQ4jfdZk5D9Cp3j3O4s++NMmRsUSL8H1lVABS3E4L4zUTobfpiYwnHvyLOScTW 5gYaACmYPKzlj9P5EgVKt8IQAInXrWYWhBMvYPD80CkQo0s/Gye4BTWFVSgQhtcfsDst4Q yWXLhHCHqC9YbV4ResCs+0G3xwhNQx67v/N4I4PCXPV1jmsNBCw+i+rxYBlIuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ec32fc2af52530e49d8a522ae29bf20b2e57603b commit ec32fc2af52530e49d8a522ae29bf20b2e57603b Author: Bjoern A. Zeeb AuthorDate: 2022-07-05 00:53:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-05 00:53:42 +0000 dwc3: fix from not working During the review of 09cdf4878c621be4cd229fa88cdccdcdc8c101f7 we switched from cached registers to reading them as needed. One read of the two reads was moved after the softreset got triggered and as a result returned 0 rather than the proper register value. Moving the read before the softreset gets initiated seems to make things work again and xhci.c no longer complains about "Controller does not support 4K page size.". MFC after: 10 days X-MFC with: 09cdf4878c621be4cd229fa88cdccdcdc8c101f7 Pointy hat to: bz --- sys/dev/usb/controller/dwc3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c index da64512af647..a71f92abebd9 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3.c @@ -207,11 +207,12 @@ snps_dwc3_reset(struct snps_dwc3_softc *sc) if (sc->usb3_phy) phy_enable(sc->usb3_phy); + ghwp0 = DWC3_READ(sc, DWC3_GHWPARAMS0); + gctl = DWC3_READ(sc, DWC3_GCTL); gctl |= DWC3_GCTL_CORESOFTRESET; DWC3_WRITE(sc, DWC3_GCTL, gctl); - ghwp0 = DWC3_READ(sc, DWC3_GHWPARAMS0); phy2 = DWC3_READ(sc, DWC3_GUSB2PHYCFG0); phy2 |= DWC3_GUSB2PHYCFG0_PHYSOFTRST; if ((ghwp0 & DWC3_GHWPARAMS0_MODE_MASK) ==