Re: [PATCH net v1 1/1] net: phylink: keep initial advertising settings

From: Anandu Padinhare

Date: Mon Nov 09 2026 - 05:02:53 EST


On Wed, Nov 04, 2026 at 01:55:09PM +0100, Thilo Zirnstein wrote:
> Connecting the phy while ndo_open callback seems to be a common pattern,
> affected drivers are:
>
> * macb
> * r8169
> * stmmac
> * tn40xx

Hi Thilo,

Results from an ADSP-SC598 board (stmmac, RGMII, TI DP83867 PHY) with
a 6.18-based kernel, with and without this patch.

1. The case in the commit message is fixed, with both the dp83867 and
the generic PHY driver:

ip link set eth0 down
ethtool -s eth0 speed 100 duplex full autoneg on
ip link set eth0 up

Without the patch the link comes up at 1000 Mb/s; with it, at
100 Mb/s.

2. In that same case the pause bits are lost: with the patch the link
comes up with flow control off; without it, pause stays on. Same
with both PHY drivers. While the interface is down, ethtool shows
no advertised modes and no pause, before and after the
"ethtool -s" (phylink_ethtool_ksettings_get() reports none when no
PHY is attached), and the AND then drops the pause bits the PHY
advertises.

3. Sashiko's sequences (a) and (b) both reproduce with the dp83867
driver:

(a) advertise 100baseT/Full while up, ifdown/ifup: 100 Mb/s.
advertise 10/100/1000baseT/Full while up: 1000 Mb/s.
ifdown/ifup: back to 100 Mb/s, advertising only 100baseT/Full.

(b) continuing, advertise 1000baseT/Full while up: 1000 Mb/s.
ifdown/ifup: "Advertised link modes: Not reported", and the
link stays down (NO-CARRIER).

Without the patch, both keep the last setting: (a) comes back at
1000 Mb/s, and (b) at 1000 Mb/s with 1000baseT/Full advertised.

Happy to test a v2 on this board.