From nobody Mon Oct 16 19:48:38 2023 X-Original-To: dev-commits-src-main@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 4S8SN71CXLz4xkTm; Mon, 16 Oct 2023 19:48:39 +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 4S8SN70kplz4GJJ; Mon, 16 Oct 2023 19:48:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697485719; 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=4fPA0+hp/D2q8wz4PlMyvfhPTFelK9ZlNgEx/BlF2zE=; b=WY9h+xXTbmvf+y5iZATY7kId/BjAl1aBRrqo2IYqQmHf6TAxegfGOMJ9KrvrLJMFJYCN0W fem4w/SEOL/lXkpGbk9EOOttVhXlUQNBMa2T+XgKO70oEsD5o3yWY/Nncwxd7J+1sz7Tkt dYc/wQb3yQO6+/w4/f9DWXVkwQMzoBVoiYByZQMJcyBVreLGoMikmLyGa/bG/xIeI2o9Hm 7RhIr8sS+LRkOk6Wh4Ih5iJXBq7pnW/g2xyRaWmz6pKKe2uA1gsE4bfUp51KmbLg6NMja3 24DzoXvez/v/ndJuGTwPKz5ux4xSNr5c0JkSNZtGWuvWklMhs4nSth3K8EtUMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697485719; a=rsa-sha256; cv=none; b=Hw0vkjwrrZ/0ZX137esrrzVacYSoUnywneJE6mqwvjJF8Z0geP/lnCeuksfTsjCLRYBgpo S2l98HSqWLNsUO0eLzMXjZuMkUWzyYI0lofnqfYdh1kII1yVPehwahVytjnjbgEu5tkhjM lDefYuRzXr0LETVg9WEPrM1d4sorRVa3pVzusIiMuuHHPj+swlVA6Nd5YPetPyzMvyoH+I SHoeYZu3xGsou4wYwJu7c5wzVawYd+fXTlp2+w+hazkuQDeNdWmj3qyJpkSZcAOg8BwL7O jUk/DBpa+7Gh3RZJI2QcE2Vn4aHcv0k5OaTWCNEJ3nFvitOKbtesDdWxlY04Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697485719; 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=4fPA0+hp/D2q8wz4PlMyvfhPTFelK9ZlNgEx/BlF2zE=; b=pbu+FigULnZs1JTgBZJmdKJCWdbaHrErWGRVuoiTg9v1dEitD+ckVDMAKN09gT0I2WUmZr xDXyTTyGTSpVWNgl4hwwqKJwFFUyzY0e1h50i1cTfcgVdLbRZ75AiedITMdGOslw6oVBwp qyWGMsAKV4DA9eSuLUCya6UlG4Fjo89fFOOq7z/RK9CX+Qmbhc1KB1SkOy1lI2dsppn4ue rpEboeaycK4SzDKTN+VXM2GrsjuF8J7dclIu8mHE3QLM39nuY/w84CqonQnBIh1XS98B87 xELgxuz2Ey4kzTSaq7wLI4+yiQT4J8xFwZCpvADnd1h3A5lKqNy6NbanWDD73Q== 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 4S8SN66n5szt4P; Mon, 16 Oct 2023 19:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39GJmcsA012423; Mon, 16 Oct 2023 19:48:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GJmcU7012420; Mon, 16 Oct 2023 19:48:38 GMT (envelope-from git) Date: Mon, 16 Oct 2023 19:48:38 GMT Message-Id: <202310161948.39GJmcU7012420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 0cb63dcac446 - main - Revert "dwc: re-rewrite barrier part" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cb63dcac446df85787cc0a77d4d38d01ff92913 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0cb63dcac446df85787cc0a77d4d38d01ff92913 commit 0cb63dcac446df85787cc0a77d4d38d01ff92913 Author: Emmanuel Vadot AuthorDate: 2023-10-16 19:43:36 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-16 19:48:19 +0000 Revert "dwc: re-rewrite barrier part" Turns out we need all the barrier. The one before writing the OWN bit is needed so the DMA engine have coherent data, the second one (after the OWN bit is set) is also needed because the DMA buffers are allocated with VM_MEMATTR_DEFAULT whic equals to being cached. This reverts commit 2b4f615e7d4720b16007cfa8aaedf720f572067a. This reverts commit 4870346488051b9c4a1dc8b11cab55d4e5b7c230. Reported by: mmel --- sys/dev/dwc/dwc1000_dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index c91036f5a714..f6baa0bd3e45 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -218,6 +218,7 @@ txdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr, sc->txdesc_ring[idx].desc1 = desc1; wmb(); sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; + wmb(); } inline static uint32_t @@ -238,6 +239,7 @@ rxdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr) wmb(); sc->rxdesc_ring[idx].desc0 = RDESC0_OWN; + wmb(); return (nidx); } @@ -524,6 +526,7 @@ dma1000_rxfinish_locked(struct dwc_softc *sc) if (m == NULL) { wmb(); desc->desc0 = RDESC0_OWN; + wmb(); } else { /* We cannot create hole in RX ring */ error = dma1000_setup_rxbuf(sc, idx, m);