πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21093

Re: [PATCH net-next 1/3] net: stmmac: dwmac-sun8i: allow controlling TX and RX flow control separately

#21093
From: netdev-bot+sashiko
Date: Mon, 23 Nov 2026 14:51
64 lines
10424 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] In drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c, the commit
  message for sun8i_dwmac_flow_ctrl() presents the change as a new…

--

net: stmmac: dwmac-sun8i: allow controlling TX and RX flow control separately

This changes sun8i_dwmac_flow_ctrl() in dwmac-sun8i.c to test the FLOW_RX
and FLOW_TX bits on their own. Before, it only enabled
EMAC_RX_FLOW_CTL_EN and EMAC_TX_FLOW_CTL_EN when fc == FLOW_AUTO.

> Currently, the sun8i flow control setup only looks at FLOW_AUTO (which
> is FLOW_RX | FLOW_TX), and enables RX/TX based on that.
>
> Allow enabling RX/TX flow control directions separately.

[Severity: Low]
Would this be better described as a fix than as a new capability?

Since commit 9cb54af214a7 ("net: stmmac: Fix IP-cores specific MAC
capabilities"), sun8i_dwmac_setup() advertises asymmetric pause to
phylink:

    mac->link.caps = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
                     MAC_10 | MAC_100 | MAC_1000;

When pause resolves asymmetrically, stmmac_mac_link_up() passes a single
direction:

    if (rx_pause && tx_pause)
        flow_ctrl = FLOW_AUTO;
    else if (rx_pause && !tx_pause)
        flow_ctrl = FLOW_RX;
    else if (!rx_pause && tx_pause)
        flow_ctrl = FLOW_TX;

With the old fc == FLOW_AUTO test in sun8i_dwmac_flow_ctrl(), FLOW_RX or
FLOW_TX alone cleared both EMAC_RX_FLOW_CTL_EN and EMAC_TX_FLOW_CTL_EN.
Phylink and ethtool -a still reported pause as active.

There are two ways to reach the rx-only case:

- The link partner advertises only Asym_Pause, so linkmode_resolve_pause()
  gives rx_pause=1 and tx_pause=0.
- The admin runs "ethtool -A ethX autoneg off rx on tx off".

In that case the MAC ignores the partner's PAUSE frames.

Should the commit message say that this fixes that behaviour, and add a
tag like this one?

Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")

That would let the stable maintainers consider it for backporting.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261122144926.284857-1-maxime.chevallier%40bootlin.com
Technical Details
Message-ID: <179544551726.3135.4955672049699501900@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369494-linux-kernel-netdev=dewy.ru
References: <20261122144926.284857-2-maxime.chevallier@bootlin.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369494-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 1/3] net: stmmac: dwmac-sun8i: allow controlling
 TX and RX flow control separately
Date: Mon, 23 Nov 2026 14:51:57 +0000
Organization: Usenet Network
Message-ID: <179544551726.3135.4955672049699501900@kernel.org>
References: <20261122144926.284857-2-maxime.chevallier@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3905439"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:45+GSN11AdQQFMyGzECt8TRUZdU= sha256:fE9mdCb6fGZ37eM7f9VY/dHQDDEAxpHAqFrrgQjrQJQ=
	sha1:JhfCaiv81MKFrPQ+RfvpviUbM4Y= sha256:WMSQ3XbCG0sbVhF1mcTp1sEOdJRGDLP/BM1AyU69VNs=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 636A7125DB9; Mon, 23 Nov 2026 17:52:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 3q-HechIw2fj;
	Mon, 23 Nov 2026 17:52:21 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369494-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 18B90125DBB; Mon, 23 Nov 2026 17:52:11 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id AC6B72B3B9; Mon, 23 Nov 2026 14:52:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795445525;
	b=o1nqklLyJD4SYoFW50NU40YgCaH+pTh2uPvTvOSQAMjwCU1hJ18S8HW0XGpLum+b5Mig
	 4m6wvNL7Len4DGz6ho8DDk50rev/5Tho65+cnqdVluArGln1EqstEZC3SZH0jHAL2lEe2
	 sCChCrVppnTZREu1pVVGMgMsU0UMeow+BO+0I+1okrOHmZFqY3HoaRocp20hARYSWfRc4
	 jmTilNN9UaDcOXhT16IVYKdMkEFzDKRfa98SLEiFEVwox+9WQRfVfxkC7YzFkQkg9nw8X
	 zBeUqC3LLPR38yFy8FDMzLQNfZKEWOYrtJDn9M/CWz9tRPqcL4uLTjVHE2A2t98VivA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795445525;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=OM5RiI5MPg9K/gV7t/uunDu6RnP3U/TYNj4L/SIdYKc=;
	b=jzJ5sVRqNLLhRsEBD0tIEdZsH59ddSlXGQm3JB63CDWHZTcB7Q+82Wf7k58eCNECt6/z
	 BZzyPirJEtF+QTYeejq9vNBWLLjfQnoxIcir05nm2gvTkHEsxWWwMzGm0KV5mzs8G6llp
	 ENVRcPSQIWesWEtR73C7WLq6yYDyN+olI4LY72zA/8VFyqzMIsLZ1i6BkU9RpIPH/A27L
	 dTwuwVVHo/cpTqaX5M5j2UcVtSRsUE85I3/QBY/6PHPTPE4Ro0cm1kaR0nSjcRDyxDy+E
	 QL/i8alcG34cCmK54ltmIUmK2grzw0hhdgBXhPp4akKxcImnicY9rJPDmghgNXphPiA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YAZVdFjD;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 48551606A31F;
	Mon, 23 Nov 2026 14:52:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YAZVdFjD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795445519;
	b=MW1S4LrCmhXbcXKVH1mCXXs7SwmPMWTeYcSOw2BpkY62fwaz9OsnWLu2cucEqBi6gDat
	 xeH5F4tcVsEvkmBDMGv4MPE+X+A3AboLK36LI1DATt3HcTgLHqQDtavVU1PcR8WzymBB3
	 SWLXQkudZLVUiSrq+3B8x/8J0kex0rWX8+qt8KaHwNJIPmkcGIoKEhUs75RvC38KvXz2b
	 9RO6h+XrwfDB9z2CqZaEC1HEb4xmmLjMRcVNm4V/jip5gnGETdtR3q8LVFoXqugqbJmFx
	 f6IKKfrcgi6G3i1vfCuZWaQDOk22PPSelY5duElIA4fGNtrDLTprTGV9mYiM1SmgMew==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795445519;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=OM5RiI5MPg9K/gV7t/uunDu6RnP3U/TYNj4L/SIdYKc=;
	b=ux5ua7gpWPjXFcvrDM9NOHcOIG8sDB7RRXnWcd/GzDYwcNz5D3kivhUS5AQ188PJa7EK
	 b1SqXPiobBgzb1mnDC6UP0oS5mq3yPIjkFWfSZVaBoY4YwJmJg7HTLACRVapNKOw8klss
	 cVxy5cmjo2zixsWW611hmbyOOZrbSrdf3Y/y+I9FyPKS4KsDegZg23vXlE363N4Al+WWH
	 F/mG464LAq6gIguvPb6+FZHV3WXdPtkR/+BfKBSjL98qpxpvW6Ot+apdPxpOygWkXinU/
	 sN9x1md1A1Ct8C9meMN5COKdf+5CldkZOAd9aTWd3lsvtHBIODxKHqsVRLG74fC9smQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YAZVdFjD;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 649DC606A31E;
	Mon, 23 Nov 2026 14:51:59 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B739C1F000CA;
	Mon, 23 Nov 2026 14:51:57 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795445518;
	bh=OM5RiI5MPg9K/gV7t/uunDu6RnP3U/TYNj4L/SIdYKc=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=YAZVdFjDFEs0NzeNC9ZBFipCn50+OJD1FhfJDKJIG9+2Ye+6MuGT+5KOdWqzczomL
	 1vDrFJmuDqfKIM4Gihh3D7LyHgVFo5g3cwIzrwfsc6XD7VxKYi8AthMvCm+OvHVMaE
	 Y/tlkC8M5TpfIlLC3BoxgfdUQ20PB+5gFH5BmCxRCJhiyJ+7h2OacdXCsVX9jFzW4m
	 yijw7+N4MT0qDz5XVvjQtxr6wxytTWJ6agFqBBf5yikMZsadymw1KW2pH8Z/W6GwyJ
	 X7Ui+2IFY7ahw1ZYRShTIZRe1EHv7akMEnt2os4lmsF9e/BV/1SngxKXwJ6pK/UK1Z
	 V42Wjr7MN15Dg==
X-Cc: andrew+netdev@lunn.ch, kuba@kernel.org, davem@davemloft.net,
 edumazet@google.com, pabeni@redhat.com, horms@kernel.org, willemb@google.com,
 wens@kernel.org, jernej.skrabec@gmail.com, samuel@sholland.org,
 mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
 linux@armlinux.org.uk, lorenzo.bianconi@oss.qualcomm.com, nb@tipi-net.de,
 thomas.petazzoni@bootlin.com, alexis.lothore@bootlin.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev
X-In-Reply-To: <20261122144926.284857-2-maxime.chevallier@bootlin.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list