From patchwork Sun Nov 22 14:49:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 516 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id A70F31C2BE6 for ; Sun, 22 Nov 2026 15:49:48 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=bootlin.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27998-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27998-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 739352ED9B for ; Sun, 22 Nov 2026 14:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795358985; b=G+M1vnIAOKqFaipm2gmvtFhYVgHj+//8t91G3OSzDVMM0vnu5/0tntC1Wa6W0PG9kG10 BJWKO04dCrhySife0zD6bNvANnBn1HH/KeWRKRc59GDHGTn0zI0ARdNGC2ITzCb9EvrPM 7Ht3JIeH8rWWL3QvnZAnAf1uYZ/ps0SVlQ6+UJNUvvSBccpSLi3JmfPXEeQZXA08bWvB5 2IiWWS0N5vi0cywvZUEl0z+h3YhllOKH/nr4ElMajwTBYwVWtaqLCI2c4pjr8Ea3sKiTK /CEtf3aoUdzIYu4qgf5yATifRQhG8PxVkChaQ6ZCEv2Rm7qhI7UZzkC6EjtAhbp0UYQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795358985; h=X-Original-To:Received:DMARC-Filter:Received:Received:Received: DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=UT6ps64F668nova2kLKPiXUITTrjy6DxQnfrymQobSo=; b=Fr30OgnlOAGbVdUcqG2AVaH6DNDhg53aotFL1ohMr2bBEWFW0wrX9+NCqkaM2+YHwbiE u8YBKyFhts/s2i7J2mWKmtP/eJfdBBaC4UsMA34e7KfB52LhfuJgpRGK4xLuvssRrsMhM x4c+HtWEG7DZQ8fIllCXnW2IT0rp+KXSpQ6OETWaoxC8fK3/367+1xeEd4ZBpArKB4wa0 MAIdInXJ+4b6yoSVQeS7j/Y06ciZeTap90nIapDyGHE8spOPBjQxTj5Bt5/QF/oTPAa6H cnSlKlWZ9YoRd1jzmxLpBCotJdcIYG7+9O6gfLS29ZbcIwbXoPwZOzUrDlt5ypnTwrA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=N66DNJa8; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54740606A336; Sun, 22 Nov 2026 14:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=N66DNJa8 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795358985; b=Ej0R0gf1yhMoTATew22PdofeLm1SPwq6qcJq8BEbcJn2zU17yX8o9I7XZxpdlmIuh13l HZa9hB743K1uzu5/fpLyLnPzShl/V5th6iQGo94FIyNr3NOwzebvkqxOUgnppjbIls7D/ D89M77/ZJ2ecHkP+NTwevn8LxsCt/IoIF3KH83saTTFsToM9jmgh1HH2Efo22pS5mQCZv kmjaRQ6YpReww2m3/vMJdF0eQFeqlkGOFtMvJEdBzw6NvjaDcUUzEqf66JntDM3z8bBYu r+gBou08SVa6zCxDNMtBjkJh2G5Ga8cgOrYOhUr/0ERBQrdB08sb/V7EIrbA5iEGuxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795358985; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=UT6ps64F668nova2kLKPiXUITTrjy6DxQnfrymQobSo=; b=CjzaGb5s2JdO+yoG/lzH5uKDPR/0LSg0xabw8xoRLh3BVFwtl+qsQOrJ+nJLAfeYUkz/ G0QZGCsPRxrVpRBhNnE1tqOJLv1czLqrut44M3smD5qIerooNvnXAprzjeE/bpes/TvCX 95/K0sCGTK1Tmjik26J+tpabLN2i0VIWEbH/yi6vcFIfO7TeWE2+XzuOpUTso2WKUInIP bxkYsu/GU+oRKbiygyF3xOg+zs56jwF8pf+CWVPgVpsN5qhhsGufBUhcBZqA5ki073ppo fBJ9kbXdo6TZXdZKwQ6DF0s7zE7+cha/D9Oul6o1HpGSVVYoXCOvYpbER3RsmJCE5Xw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=N66DNJa8; arc=none smtp.remote-ip=185.246.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B5EF606A320 for ; Sun, 22 Nov 2026 14:49:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6B5EF606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 9EEA31A1709; Sun, 22 Nov 2026 14:49:40 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6B10D60512; Sun, 22 Nov 2026 14:49:40 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2790711E60230; Sun, 22 Nov 2026 15:49:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795358978; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=UT6ps64F668nova2kLKPiXUITTrjy6DxQnfrymQobSo=; b=N66DNJa8YjNzKnWHnzM692QDi5itNkxnx6Ayb++iXjPUDAcogJMw+rMrENYvBOWTlFBbom mTGXMFnyfNjZzPZSpCZ9BRLDj/vwGTBAsEjw3+M+m0C8MgwD1KQSxrMhgsQsQvBAyCYblY P5/96JdenISrIOSaThFIZmtkt08J1BlT9/Drbqd8rA6YHNh5Jp8rfh4JrL2cn0kPUJzov5 5dIqnVzbbHCwzdGIjAsvUuyzm4v7LomRT5Vw7XoROt3MEDB43GesDqX0O5ybkXMHyKY3tw +95lW2RqUXKwLe+eEfIrFCN0/EMgknyHpCFl1qbfn80sxNR0ethuhWhqjal7tA== From: Maxime Chevallier To: Andrew Lunn , Jakub Kicinski , davem@davemloft.net, Eric Dumazet , Paolo Abeni , Simon Horman , Willem de Bruijn , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Coquelin , Alexandre Torgue , Russell King , Lorenzo Bianconi , Nicolai Buchwitz Cc: Maxime Chevallier , thomas.petazzoni@bootlin.com, =?utf-8?q?Alexis_Lothor=C3=A9?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH net-next 0/3] net: stmmac: dwmac-sun8i: enable Flow Control Date: Sun, 22 Nov 2026 15:49:22 +0100 Message-ID: <20261122144926.284857-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.69 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; R_DKIM_ALLOW(0.00)[bootlin.com:s=dkim]; TAGGED_RCPT(0.00)[netdev]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[bootlin.com:dkim]; RCPT_COUNT_TWELVE(0.00)[22]; RCVD_COUNT_SEVEN(0.00)[7]; FROM_NEQ_ENVFROM(0.00)[maxime.chevallier@bootlin.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-27998-noreply=patchwork.local]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,212.83.139.233:received,185.246.84.56:received]; FORGED_SENDER_MAILLIST(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; DKIM_TRACE(0.00)[bootlin.com:+]; FREEMAIL_TO(0.00)[lunn.ch,kernel.org,davemloft.net,google.com,redhat.com,gmail.com,sholland.org,foss.st.com,armlinux.org.uk,oss.qualcomm.com,tipi-net.de]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_ALLOW(0.00)[bootlin.com,reject]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: A70F31C2BE6 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX While running the "ethtool -t" selftests on H2+ (orangepi zero), the Flow Control selftests consistently fails. I originally blamed that on the fact that the board was connected to a peer that didn't support Pause and that we didn't negotiate Pause at all. The ethtool selftest are sensitive to what the Peer advertises even though this is a full loopback test, but it is what it is :( Since then, the orangepi zero I'm testing dwmac-sun8i on has been wired to a proper peer, and the selftest still fails. This selftest sends tons of frames in loopback and checks that Pause frames are generated, and failing it means no pause frames were sent by the MAC. Turns out, multiple things were missing in the dwmac-sun8i implementation to get Flow Control to work. Patch 1 allows independently setting RX/TX FC Patch 2 is the one making FC actually work, by configuring the fifo thresholds Patch 3 sets the quanta values in the frames. This seems to have never worked, so since it's not fixing a regression I'm targetting net-next here. This was tested only on H2+. Thanks, Maxime Maxime Chevallier (3): net: stmmac: dwmac-sun8i: allow controlling TX and RX flow control separately net: stmmac: dwmac-sun8i: emit pause frames when the RX FIFO fills net: stmmac: dwmac-sun8i: configure the pause time for TX flow control .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-)