Article View: linux.kernel.netdev
Article #23805Re: [PATCH net-next 1/2] net: usb: ax88179: Make receiving FCS on AX88179A configurable
From: netdev-bot+sashiko
Date: Sat, 28 Nov 2026 06:42
Date: Sat, 28 Nov 2026 06:42
135 lines
13057 bytes
13057 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] ax88179_set_multicast()
(drivers/net/usb/ax88179_lib.c:362-364) treats NETIF_F_RXALL the same…
- [Low] The commit is titled as making FCS reception 'configurable', but
what it really does is fix a bug.
- [Low] The new condition `data->chip_version != AX_VERSION_AX88179A` in
ax88179_set_multicast() (drivers/net/usb/ax88179_lib.c:363) also…
--
net: usb: ax88179: Make receiving FCS on AX88179A configurable
With this commit, ax88179_set_multicast() no longer always sets
AX_RX_CTL_DROPCRCERR. That bit keeps the FCS attached to received frames.
On AX88179A it is now only set when NETIF_F_RXFCS or NETIF_F_RXALL is
enabled. Other chip versions behave as before.
> diff --git a/drivers/net/usb/ax88179_lib.c b/drivers/net/usb/ax88179_lib.c
> index 821ee9cd8ded1..85d774bf214f8 100644
> --- a/drivers/net/usb/ax88179_lib.c
> +++ b/drivers/net/usb/ax88179_lib.c
> @@ -356,10 +356,12 @@ void ax88179_set_multicast(struct net_device *net)
>
> data = dev->driver_priv;
>
> - rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_DROPCRCERR);
> + rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB);
> if (data->ip_align)
> rxctl |= AX_RX_CTL_IPE;
> -
> + if (net->features & (NETIF_F_RXFCS | NETIF_F_RXALL) ||
[Severity: Medium]
Should NETIF_F_RXALL by itself cause the FCS to be kept?
NETIF_F_RXALL is about delivering frames with errors, such as a bad FCS.
NETIF_F_RXFCS is the flag that tells the stack skbs end with the FCS.
Other drivers keep the two separate. For example, e1000 trims the 4 bytes
unless NETIF_F_RXFCS is set.
This branch can't be reached in this patch alone, because hw_features
doesn't include these bits yet. The follow-up commit "net: usb: ax88179:
Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A" adds them to
hw_features in ax88179a_bind(). It also copies the same mapping into
ax88179a_set_features() and ax88179a_reset():
if (features & (NETIF_F_RXFCS | NETIF_F_RXALL))
rxctl |= AX_RX_CTL_DROPCRCERR;
In that series, ax88179a_rx_fixup() only uses the flags to widen the MTU
check:
if (features & (NETIF_F_RXFCS | NETIF_F_RXALL))
fcs_trailer = ETH_FCS_LEN;
After that check, it copies the full pkt_len without trimming:
skb_put(ax_skb, pkt_len);
memcpy(ax_skb->data, skb->data + (ax179_data->ip_align ? AX179A_RX_HW_PAD : 0),
pkt_len);
Take "ethtool -K <dev> rx-all on" with rx-fcs off. Wouldn't every frame
then reach the stack with 4 extra trailing bytes, and nothing to show
that they are an FCS?
Could AX_RX_CTL_DROPCRCERR depend only on NETIF_F_RXFCS? Another option
is to trim ETH_FCS_LEN in ax88179a_rx_fixup() when only NETIF_F_RXALL is
set.
> + data->chip_version != AX_VERSION_AX88179A)
[Severity: Low]
This isn't a bug, but the subject says FCS reception is being made
"configurable", and the change also fixes existing behaviour.
Before this patch, AX_RX_CTL_DROPCRCERR was always set on AX88179A, and
ax88179a_rx_fixup() doesn't trim the FCS. So every frame received on
AX88179A/AX88772D reached the stack with the 4-byte FCS still attached.
Could the commit message say this directly? Could it also add a Fixes:
tag for 7d573278f9a5 ("ax88179_178a: Add HW support for AX179A-based
chips")? That commit is where DROPCRCERR became always-on for these chips.
It was merged to net-next on 2026-11-14 and is probably not in a released
kernel yet, so this is mostly for traceability.
The commit message also doesn't mention that the new chip_version test
affects the AX88772D.
[Severity: Low]
Does the chip_version != AX_VERSION_AX88179A test also change behaviour
on the AX88772D? ax88179_lib.h has:
AX_VERSION_AX88179A = 0x6, /* Also AX88772D */
ax88179a_bind() tells the two chips apart only through is_ax88772d:
if (ax179_data->chip_version == AX_VERSION_AX88179A) {
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x300)
ax179_data->is_ax88772d = 1;
}
So AX_RX_CTL_DROPCRCERR is now cleared on AX88772D as well. The commit
message says this was only tested on AX88179A. According to the comment
in ax88179a_bind(), AX88279 needs the same bit for correct RX URB
framing.
The follow-up commit "net: usb: ax88179: Support NETIF_F_RXFCS and
NETIF_F_RXALL on AX88179A" keeps this behaviour. ax88179a_reset() only
forces DROPCRCERR for AX88279, and RXFCS/RXALL are advertised on AX88772D
too.
Has this been tested on an AX88772D, or should that chip be excluded
using is_ax88772d? Either way, could the commit message mention the
AX88772D?
> + rxctl |= AX_RX_CTL_DROPCRCERR;
> if (net->flags & IFF_PROMISC) {
> rxctl |= AX_RX_CTL_PRO;
> } else if (net->flags & IFF_ALLMULTI ||
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127-fcs-v1-0-0c4ede015bf5%40birger-koblitz.de
Technical Details
Message-ID:
<179584815990.3135.5137971484005173950@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373038-linux-kernel-netdev=dewy.ruReferences:
<20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373038-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 1/2] net: usb: ax88179: Make receiving FCS on AX88179A configurable Date: Sat, 28 Nov 2026 06:42:39 +0000 Organization: Usenet Network Message-ID: <179584815990.3135.5137971484005173950@kernel.org> References: <20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="899031"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:6WbGOoeFLBD4CkP4aIKf0gkaMTc= sha256:bdbajyijl2fWQA2NqDaFzTiZjs3tnLOtKno4LB9E/1o= sha1:DP2Ml8nZjM+Bz7gPYdKzLMAMEyM= sha256:8brxq5XaNPlNhibq7iR8ReJn4Z4AxKFycy877XMpTwI= 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 01680125F6B; Sat, 28 Nov 2026 09:43:06 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.301 X-Spam-Status: No, score=-2.301 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, 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] 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 jeFQ5rnqNuuZ; Sat, 28 Nov 2026 09:43:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373038-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 2ABA0125F70; Sat, 28 Nov 2026 09:42:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 82AAF2BA89; Sat, 28 Nov 2026 06:42:52 +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=1795848172; b=lYIl/8UQRwGodJszH8P/6j2oX4wCN1mDS2LGQ8TS4G9jun9Ex9uNvleFiR6LJmovj16e DxyzGSpzLmFlciTkqNy4JAhYbN+1GDd9+xZh2+pSPmUe4d+C5M/JsdABG2n87oRHbhZIn iThAnW1JKZP9kFxUmQM7nIGzx92uXCnoCAO55uxjM2IXZro763XSo4zSCW3f6kfHMfujl r4C5aQd3nKYo9EqW4QhGF0sbcsTEaePHX+hy+XoqMtYatio0GexIOq7qDAmKyAVKv/z1c twc7SMuwBxtES3gWlI/mYFl8Z7G60wkUrvl58fCB0i1CbJfXnRcMT/KgWqbtMA9Dp3A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795848172; 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=3ZankHElkFGMWDSXqfvCsy7/t0XVhIK4lZAWUG908DQ=; b=IIhUQf+OyMFkh0jbDYmCRBnsuBI/T+3h2vGTz2zsn/iBgYdNTOfsSxtWQCgEa5eU16sW sEgkzOHn5KtWbJ9AfjsvGtgDEbqnNZPjTcX5m5Rb51mSyn2nEmUINvbl2tTdwxVWowNw0 5DMgXiGBtGmo88VHgaqA8/S6Im5Omrst/OXEVH1xCxeAu4tb+VModRXvNOkZaOLnH2+7K MfjcwNsmRYSqgRc7cSCF0txo1xmjfhP2VD8i+mZHPd8KO5+AIgcnrT5eo+5mVv2s1UX+O 4Wfr3aBbNtWXk2nfu2zNc2pe+SWU6Ueehln3qCPagx3r1BdL2KUNORB6z17paONZS6g== 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=Y69XFGoZ; 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 1DB04606A32F; Sat, 28 Nov 2026 06:42:52 +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=Y69XFGoZ 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=1795848161; b=SxKLc3YMi7B5NxQvF8I6jkwmqkB9ClOl2L4/lRr4jNzxGwrh9+ITpHEO2G9eItfBx2++ GAmMRAUJ+IdwX+FIvTUj+zPhzDNtpuk8CLWNl/mNIom8fZCk4R3s0yGrF5NH/ssy3VpSn OBNeL3eY4BclMJ4JwTPKlheYmg0f2Ru3aZxO1/yu06B1ttg6hzygX9wRB7oL8Dma42z8T q7rDwLqSnbbz3afsR8lTBmxXEelDe27FzoeLHiQ1KOSIr4YjgQK7yMApoAZuVIhskO3PH N2rvNg/G1/3apak6hQ8abygM+ycug/NCwOX+QJBeZNnNfdnBJrMbQtCfW4OhqdcmZHA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795848161; 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=3ZankHElkFGMWDSXqfvCsy7/t0XVhIK4lZAWUG908DQ=; b=fXgIfTSsspeHZfLff9VkY04XZZbJZkOu5qQNFssQYwN849T1vrHUrImEYEBQ7DdVsr8T 2+fMZulp6n1ccTamXjTK2R8n+SeJTvOllPP/zfgHoOL8pE59nCv+LiKsoNPaM1tPN7kE1 TBQfEEGc6+8aB6CpcVgtL3HmfhpOi9f3LSO0X3vLCGb8l184U1Vl52p9koP+GTknT6mLG ZppRUfE8O8UzDLNCw6MiJHoBjg8TsWLmDCQonu8cfowj6MwVbdBnEWGc+rlFlyZ7kC4xa twwwg3fjWFDK9cuvh+QuPovSW7542rP8JFSJKHuVkCKnrWi/L2IPffcaX5xNoGEF/hw== 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=Y69XFGoZ; 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 3B2D2606A323; Sat, 28 Nov 2026 06:42:40 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FA701F00897; Sat, 28 Nov 2026 06:42:40 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795848160; bh=3ZankHElkFGMWDSXqfvCsy7/t0XVhIK4lZAWUG908DQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Y69XFGoZE+e5loO7Hwgmbzf2mtOyCWEnVxkbKtdnQJqWmgOjIlFCKRZzQLDslcg43 rOr4AtzES+Ok1xSxRazRqjJ5h/SyJNj2+VKVO7Li0jbu2xFmcD4sN4rfRkwHKlDicH wbXYP7kGl1rw2B94GV3rVfK33hTmI46rCGPAuZQl4flg+vXdXeFJ0GK8M6Pwh2CLSs C3xPZGdS0P55w3aI9sVv8B6fraRUdQjOQOuOhvDyTRGLU0hgdFXznYrjKGJ8Jgb4Lu FNs5MV4V14n8BZpBnTPVuJh9MCgmfSEekTHBFuYcoCKcdScOCJcCpS6ws72PILH20x yzeoThejFeZVA== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-usb@vger.kernel.org, benjamin.larsson@genexis.eu X-In-Reply-To: <20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de> X-sashiko-severity: Medium 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