From: netdev-bot+sashiko@kernel.org
To: mail@birger-koblitz.de
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
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 [thread overview]
Message-ID: <179584815990.3135.5137971484005173950@kernel.org> (raw)
In-Reply-To: <20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de>
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
next prev parent reply other threads:[~2026-11-28 6:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 6:36 [PATCH net-next 0/2] net: usb: ax88179: Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A Birger Koblitz
2026-11-27 6:36 ` [PATCH net-next 1/2] net: usb: ax88179: Make receiving FCS on AX88179A configurable Birger Koblitz
2026-11-28 6:42 ` netdev-bot+sashiko [this message]
2026-11-28 17:54 ` Andrew Lunn
2026-11-28 18:41 ` Birger Koblitz
2026-11-27 6:36 ` [PATCH net-next 2/2] net: usb: ax88179: Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A Birger Koblitz
2026-11-28 6:42 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179584815990.3135.5137971484005173950@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=benjamin.larsson@genexis.eu \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox