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 v21 02/13] phylib: Add support for PHYs with broken forced mode
Date: Mon, 16 Nov 2026 02:06:53 +0000 [thread overview]
Message-ID: <179479481380.3136.17048496149036079912@kernel.org> (raw)
In-Reply-To: <20261114-ax88179a-v21-2-c2d34410bcbe@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] The concern: PHY_BROKEN_FORCED (include/linux/phy.h:67) has no
user at this commit, so the checks in phy_ethtool_ksettings_set()…
--
phylib: Add support for PHYs with broken forced mode
This adds a PHY_BROKEN_FORCED driver flag. With it set,
phy_ethtool_ksettings_set() and phy_mii_ioctl() return -EOPNOTSUPP when
someone asks for a forced speed/duplex mode. The aim is to avoid the
warning in the PHY state machine when config_aneg() rejects forced mode.
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index fce9bc7be3304..079c53516f424 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
[ ... ]
> @@ -1190,6 +1193,10 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
> duplex != DUPLEX_FULL)))
> return -EINVAL;
>
> + if (autoneg == AUTONEG_DISABLE && phydev->drv &&
> + (phydev->drv->flags & PHY_BROKEN_FORCED))
> + return -EOPNOTSUPP;
> +
[Severity: Low]
No driver sets PHY_BROKEN_FORCED at this commit. Doesn't that mean this
check, and the matching one in phy_mii_ioctl(), can't trigger yet?
The commit message says:
This prevents a kernel warning and stack-trace within the
phy_state_machine when PHYs return -EOPNOTSUPP from config_aneg()
Later in the series, "ax88796b: Add support for AX88772D, AX88179A and
AX88279" sets the flag on the AX88279 entry. That driver's
asix_ax88279_config_aneg() returns -EOPNOTSUPP when autoneg is disabled,
so the description is accurate once that patch is applied.
Would it help to say in the commit message that the first user comes
later in the series?
Separately, two existing drivers already reject forced mode in
config_aneg(), but they return -EINVAL:
drivers/net/phy/bcm84881.c:bcm84881_config_aneg() {
...
/* disabled autoneg doesn't seem to work with this PHY */
if (phydev->autoneg == AUTONEG_DISABLE)
return -EINVAL;
...
}
drivers/net/phy/air_en8811h.c:en8811h_config_aneg() {
...
if (phydev->autoneg == AUTONEG_DISABLE) {
phydev_warn(phydev, "Disabling autoneg is not supported\n");
return -EINVAL;
}
...
}
These two still reach the warning through
_phy_state_machine()->_phy_start_aneg()->phy_error_precise(). This
patch didn't cause that, and converting them could be a separate
follow-up.
Would these two drivers be good candidates for the new flag?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261114-ax88179a-v21-0-c2d34410bcbe%40birger-koblitz.de
next prev parent reply other threads:[~2026-11-16 2:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 10:50 [PATCH net-next v21 00/13] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-11-14 10:50 ` [PATCH net-next v21 01/13] phylink: Add phylink_mac_interrupt Birger Koblitz
2026-11-16 2:06 ` netdev-bot+sashiko
2026-11-14 10:50 ` [PATCH net-next v21 02/13] phylib: Add support for PHYs with broken forced mode Birger Koblitz
2026-11-16 2:06 ` netdev-bot+sashiko [this message]
2026-11-14 10:50 ` [PATCH net-next v21 03/13] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-11-16 2:06 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 04/13] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-11-16 2:06 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 05/13] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-11-14 10:51 ` [PATCH net-next v21 06/13] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-11-16 2:06 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 07/13] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 08/13] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 09/13] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 10/13] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 11/13] ax88179_178a: Update driver name and information Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 12/13] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-11-16 2:07 ` netdev-bot+sashiko
2026-11-14 10:51 ` [PATCH net-next v21 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-11-16 2:07 ` 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=179479481380.3136.17048496149036079912@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