Re: [PATCH net-next v21 10/13] ax88179_178a: Add ethtool get_drvinfo

From: netdev-bot+sashiko

Date: Sun Nov 15 2026 - 21:08:27 EST


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] The new ax88179a_get_drvinfo()
(drivers/net/usb/ax88179a_devices.c:247-249) prints…

--

ax88179_178a: Add ethtool get_drvinfo

This commit adds ax88179a_get_drvinfo() as the get_drvinfo ethtool
callback for AX88179A-based devices. It reports the firmware version
that was read from the device at bind time.

> diff --git a/drivers/net/usb/ax88179a_devices.c b/drivers/net/usb/ax88179a_devices.c
> index 01d6a35f68b2c..69095110e7043 100644
> --- a/drivers/net/usb/ax88179a_devices.c
> +++ b/drivers/net/usb/ax88179a_devices.c
> @@ -235,6 +235,20 @@ static int ax88179a_resume(struct usb_interface *intf)
> return usbnet_resume(intf);
> }
>
> +static void ax88179a_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
> +{
> + struct ax88179_data *priv = netdev2data(net);
> +
> + /* Inherit standard device info */
> + usbnet_get_drvinfo(net, info);
> + if (priv->chip_version < AX_VERSION_AX88179A)
> + return;
> +
> + snprintf(info->fw_version, sizeof(info->fw_version), "%d.%d.%d.%d",
> + priv->fw_version[0], priv->fw_version[1],
> + priv->fw_version[2], priv->fw_version[3]);

[Severity: Low]
What does ethtool -i report here if one of the firmware version reads
failed at bind time?

ax88179a_bind() stores 0xff in any byte whose AX88179A_ACCESS_BL read
returns an error:

drivers/net/usb/ax88179a_devices.c:ax88179a_bind() {
...
for (int i = 0; i < 3; i++) {
ret = ax88179_read_cmd(dev, AX88179A_ACCESS_BL, AX88179A_SW_VERSION + i,
1, 1, &ax179_data->fw_version[i]);
if (ret < 0)
ax179_data->fw_version[i] = 0xff;
}
ret = ax88179_read_cmd(dev, AX88179A_ACCESS_BL, AX88179A_SW_REVISION,
1, 1, &ax179_data->fw_version[3]);
if (ret < 0)
ax179_data->fw_version[3] = 0xff;
...
}

The only check in ax88179a_get_drvinfo() is the chip_version one, and
chip_version was read successfully just before these reads. So if the BL
access stalls or hits a transient USB error, the ethtool fw_version field
would show something like "255.255.255.255" or "1.2.255.3". Userspace has
no way to tell that apart from a real firmware version.

This also overwrites the dev->driver_info->description string that
usbnet_get_drvinfo() has just written into info->fw_version.

The 0xff marker itself comes from the earlier commit "ax88179_178a: Add
HW support for AX179A-based chips". This patch is what exposes it
through the ethtool uAPI.

Could the driver record whether the reads succeeded, or skip the
snprintf() when any byte holds the 0xff marker, so that the usbnet
default is kept?

> +}
> +

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261114-ax88179a-v21-0-c2d34410bcbe%40birger-koblitz.de