From: Andrew Lunn <andrew@lunn.ch>
To: Birger Koblitz <mail@birger-koblitz.de>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Jianhui Xu <neuromoments@gmail.com>
Subject: Re: [PATCH net-next v5 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279
Date: Fri, 7 Aug 2026 15:14:03 +0200 [thread overview]
Message-ID: <527d31e5-1731-4925-bf7f-a567f3fb3774@lunn.ch> (raw)
In-Reply-To: <7a91e550-ac70-4423-9aed-9f4406e71fe8@birger-koblitz.de>
On Fri, Aug 07, 2026 at 08:39:00AM +0200, Birger Koblitz wrote:
>
>
> On 06/08/2026 23:16, Andrew Lunn wrote:
> > > > > +static int asix_ax88279_config_aneg(struct phy_device *phydev)
> > > > > +{
> > > > > + bool adv_2500;
> > > > > + int ret;
> > > > > +
> > > > > + if (phydev->autoneg == AUTONEG_DISABLE) {
> > > > > + phydev_warn(phydev, "Disabling autoneg is not supported\n");
> > > > > + return -EINVAL;
> > > > > + }
> > > >
> > > > Why is that? Now that phylink is driving the PHY, and reporting
> > > > speeds, duplex etc, you should have everything you need to program the
> > > > MAC when the link mode is forced.
> > > >
> > > I tried forcing the PHY speed in the past, and it does not work.
> > > This is a limitation which is also acknowledged for the suspected underlying PHY
> > > hardware Airoha EN8811H, see the head of air_en8811h.c
> >
> > How well does this unwind on error? Is phydev->autoneg put back to the
> > old state to indicate autoneg is used?
> >
> > This is one of the areas where phylib/phylink is missing a bit of
> > support infrastructure. We have a bit indicating the PHY support
> > autoneg, ETHTOOL_LINK_MODE_Autoneg_BIT, but there is no bit
> > ETHTOOL_LINK_MODE_Force_BIT, indicating the PHY supports forced
> > mode. So the core cannot enforce this and reject it in
> > ksettings_set().
> The error is handled quite poorly:
> $ sudo ethtool -s enx6c6e07090000 autoneg off speed 1000
> $ ip a
> shows link is down
>
> Kernel log:
> [848763.836126] Asix Electronics AX88279 usb-004:045:03: Disabling autoneg is not supported
> [848763.836134] ------------[ cut here ]------------
> [848763.836137] _phy_start_aneg+0x0/0xa0: returned: -22
> [848763.836142] WARNING: drivers/net/phy/phy.c:1352 at _phy_state_machine+0x100/0x310, CPU#8: kworker/8:1/534588
> [848763.836146] Modules linked in: ax88179_178a cdc_mbim cdc_ncm ax88179(OE)
> ax88796b(OE) cdc_ether phylink(OE) r8152 nfnetlink_queue nfnetlink_log
That is ugly.
Ideally, we want phylib/phylink to report EOPNOTSUPP in
ksetting_set. However, as i said, we currently don't have a mechanism
for the PHY to report forced link does not work.
So:
Please change EINVAL to EOPNOTSUPP.
We accept your change as is.
But if you have time/energy, it would be nice to have some follow up
patches in a new series which fixes this correctly, allow a PHY to
indicate it does not support forced. The question is, how to actually
do that. The BMSR has a bit `Auto-Negotiation Ability`. But there is
no 'Forced Ability' indication. It is simply assumed all PHYs can do
forced. All the bits we have in phydev->supported, are positive, the
PHY can do something. There are no negative, the PHY cannot do
something. So i think it would be wrong to add a negative.
What we do have is struct phy_driver flags, and currently
#define PHY_IS_INTERNAL 0x00000001
#define PHY_RST_AFTER_CLK_EN 0x00000002
#define PHY_POLL_CABLE_TEST 0x00000004
#define PHY_ALWAYS_CALL_SUSPEND 0x00000008
#define MDIO_DEVICE_IS_PHY 0x80000000
So maybe add
#define PHY_BROKEN_FORCED 0x00000010
and look for that in ksettings_set() ?
Andrew
next prev parent reply other threads:[~2026-08-07 13:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 16:31 [PATCH net-next v5 00/13] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-08-02 16:31 ` [PATCH net-next v5 01/13] ax88179_178a: Fix endianness of pause watermark register Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 02/13] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 03/13] ax88179_178a: Add netdev2data() convenience function Birger Koblitz
2026-08-02 21:10 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 04/13] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-08-02 21:28 ` Andrew Lunn
2026-08-06 19:32 ` Birger Koblitz
2026-08-02 21:36 ` Andrew Lunn
2026-08-06 19:34 ` Birger Koblitz
2026-08-02 21:47 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 05/13] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 06/13] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 07/13] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-08-02 21:37 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 08/13] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 09/13] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-08-02 21:44 ` Andrew Lunn
2026-08-03 8:53 ` Birger Koblitz
2026-08-03 14:58 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 10/13] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 11/13] ax88179_178a: Update driver name and information Birger Koblitz
2026-08-02 21:45 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 12/13] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-08-02 21:55 ` Andrew Lunn
2026-08-06 19:35 ` Birger Koblitz
2026-08-06 21:16 ` Andrew Lunn
2026-08-07 6:39 ` Birger Koblitz
2026-08-07 13:14 ` Andrew Lunn [this message]
2026-08-07 18:05 ` Birger Koblitz
2026-08-07 19:12 ` Andrew Lunn
2026-08-09 15:28 ` Andrew Lunn
2026-08-09 18:18 ` Birger Koblitz
2026-08-03 7:33 ` [PATCH net-next v5 00/13] ax88179_178a: Add support for AX88179A-based chips Jianhui Xu
2026-08-03 9:53 ` Birger Koblitz
2026-08-03 14:39 ` Yuan Xu
2026-08-06 19:38 ` Birger Koblitz
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=527d31e5-1731-4925-bf7f-a567f3fb3774@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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