mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: mail@birger-koblitz.de
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, linux@armlinux.org.uk, andrew@lunn.ch,
	hkallweit1@gmail.com, chenhuacai@kernel.org, kernel@xen0n.name,
	edumazet@kernel.org, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	loongarch@lists.linux.dev, neuromoments@gmail.com,
	beganovic.emir@gmail.com
Subject: Re: [PATCH net-next v20 05/13] ax88179_178a: Add EEE configuration support for AX88179A MACs
Date: Tue, 10 Nov 2026 01:38:34 +0000	[thread overview]
Message-ID: <179427471400.994134.4547536241742867057@kernel.org> (raw)
In-Reply-To: <20261106-ax88179a-v20-5-37b5a1189983@birger-koblitz.de>

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] Baseline decision: false positive, because the next patch in the
  series fixes it.
- [Low] Baseline decision: false positive, because the next patch in the
  series fixes it.

--

ax88179_178a: Add EEE configuration support for AX88179A MACs

This commit adds mac_enable_tx_lpi and mac_disable_tx_lpi phylink callbacks
for the AX88179A. They toggle the single AX_GPHY_EEE_CTRL register through
ax88179_write_cmd(). The hardware has no LPI timer registers.

> diff --git a/drivers/net/usb/ax88179a_devices.c b/drivers/net/usb/ax88179a_devices.c
> index 1aa8479422517..62619fd68c408 100644
> --- a/drivers/net/usb/ax88179a_devices.c
> +++ b/drivers/net/usb/ax88179a_devices.c

[ ... ]

>  static const struct phylink_mac_ops ax88179a_phylink_mac_ops = {
>  	.mac_config = ax88179a_mac_config,
>  	.mac_link_down = ax88179a_mac_link_down,
>  	.mac_link_up = ax88179a_mac_link_up,
> +	.mac_disable_tx_lpi = ax88179a_mac_disable_tx_lpi,
> +	.mac_enable_tx_lpi = ax88179a_mac_enable_tx_lpi,
>  };

[Severity: Low]
With both LPI ops present, phylink_create() sets pl->mac_supports_eee_ops
to true. At this commit, ax88179a_phylink_setup() sets lpi_capabilities but
does not fill phylink_config.lpi_interfaces:

    if (!data->is_ax88772d) {
        data->phylink_config.lpi_capabilities = MAC_100FD | MAC_1000FD;
        data->phylink_config.eee_enabled_default = false;
    }

phylink_create() requires a non-empty lpi_interfaces:

    pl->mac_supports_eee = pl->mac_supports_eee_ops &&
                           pl->config->lpi_capabilities &&
                           !phy_interface_empty(pl->config->lpi_interfaces);

So mac_supports_eee comes out false. Does phylink_bringup_phy() then take
this branch for every AX88179A/AX88279 device?

    } else if (pl->mac_supports_eee_ops) {
        /* MAC supports phylink EEE, but wants EEE always disabled. */
        phy_disable_eee(phy);

ax88179a_mac_enable_tx_lpi() also looks unreachable here.
phylink_link_up() does not call phylink_activate_lpi() when
mac_supports_eee is false, and phylink_activate_lpi() returns early in any
case:

    if (!test_bit(pl->cur_interface, pl->config->lpi_interfaces)) {

phylink_ethtool_get_eee() and phylink_ethtool_set_eee() would return
-EOPNOTSUPP in this state as well.

The next patch in the series, "ax88179_178a: Add EEE configuration support
for AX88179A PHYs", copies supported_interfaces into lpi_interfaces before
phylink_create(), so this gap only exists at this one commit. The default
behaviour seen by users is unchanged, because the driver already defaults
to EEE off with eee_enabled_default = false.

Would it make sense to fill lpi_interfaces in this patch, so the new
callbacks can be reached at this commit?

[Severity: Low]
At this commit ax88179a_ethtool_ops has no .get_eee or .set_eee entries:

    static const struct ethtool_ops ax88179a_ethtool_ops = {
        ...
        .set_eeprom             = ax88179_set_eeprom,
        .nway_reset             = phy_ethtool_nway_reset,
        ...
    };

So ethtool --set-eee on an AX88179A returns -EOPNOTSUPP. Userspace has no
way to enable EEE through the new mac_enable_tx_lpi/mac_disable_tx_lpi
callbacks. EEE stays off, which matches eee_enabled_default = false.

The next patch, "ax88179_178a: Add EEE configuration support for AX88179A
PHYs", adds ax88179a_get_eee() and ax88179a_set_eee(). These wrap
phylink_ethtool_get_eee() and phylink_ethtool_set_eee() and are wired into
ax88179a_ethtool_ops.

Is splitting the MAC side and the ethtool side across these two patches
intended?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261106-ax88179a-v20-0-37b5a1189983%40birger-koblitz.de

  reply	other threads:[~2026-11-10  1:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  7:21 [PATCH net-next v20 00/13] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-11-06  7:21 ` [PATCH net-next v20 01/13] phylink: Add phylink_mac_interrupt Birger Koblitz
2026-11-06 10:11   ` Maxime Chevallier
2026-11-06 15:32     ` Birger Koblitz
2026-11-06 15:55       ` Andrew Lunn
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 02/13] phylib: Add support for PHYs with broken forced mode Birger Koblitz
2026-11-06  7:21 ` [PATCH net-next v20 03/13] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 04/13] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 05/13] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko [this message]
2026-11-06  7:21 ` [PATCH net-next v20 06/13] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 07/13] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 08/13] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 09/13] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 10/13] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 11/13] ax88179_178a: Update driver name and information Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 12/13] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-11-10  1:38   ` netdev-bot+sashiko
2026-11-06  7:21 ` [PATCH net-next v20 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-11-10  1:38   ` 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=179427471400.994134.4547536241742867057@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=beganovic.emir@gmail.com \
    --cc=chenhuacai@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@xen0n.name \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=loongarch@lists.linux.dev \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=neuromoments@gmail.com \
    --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

all inboxes | Powered by JetHome®