<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/phy/phylink.c, branch v6.6.150</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.150</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.150'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-06-04T12:42:02+00:00</updated>
<entry>
<title>net: phylink: use pl-&gt;link_interface in phylink_expects_phy()</title>
<updated>2025-06-04T12:42:02+00:00</updated>
<author>
<name>Choong Yong Liang</name>
<email>yong.liang.choong@linux.intel.com</email>
</author>
<published>2025-02-27T12:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5b23df98a925c2f79b9d2c5c02fe74812e02152'/>
<id>urn:sha1:c5b23df98a925c2f79b9d2c5c02fe74812e02152</id>
<content type='text'>
[ Upstream commit b63263555eaafbf9ab1a82f2020bbee872d83759 ]

The phylink_expects_phy() function allows MAC drivers to check if they are
expecting a PHY to attach. The checking condition in phylink_expects_phy()
aims to achieve the same result as the checking condition in
phylink_attach_phy().

However, the checking condition in phylink_expects_phy() uses
pl-&gt;link_config.interface, while phylink_attach_phy() uses
pl-&gt;link_interface.

Initially, both pl-&gt;link_interface and pl-&gt;link_config.interface are set
to SGMII, and pl-&gt;cfg_link_an_mode is set to MLO_AN_INBAND.

When the interface switches from SGMII to 2500BASE-X,
pl-&gt;link_config.interface is updated by phylink_major_config().
At this point, pl-&gt;cfg_link_an_mode remains MLO_AN_INBAND, and
pl-&gt;link_config.interface is set to 2500BASE-X.
Subsequently, when the STMMAC interface is taken down
administratively and brought back up, it is blocked by
phylink_expects_phy().

Since phylink_expects_phy() and phylink_attach_phy() aim to achieve the
same result, phylink_expects_phy() should check pl-&gt;link_interface,
which never changes, instead of pl-&gt;link_config.interface, which is
updated by phylink_major_config().

Reviewed-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Choong Yong Liang &lt;yong.liang.choong@linux.intel.com&gt;
Link: https://patch.msgid.link/20250227121522.1802832-2-yong.liang.choong@linux.intel.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phylink: initialize carrier state at creation</title>
<updated>2023-11-28T17:20:11+00:00</updated>
<author>
<name>Klaus Kudielka</name>
<email>klaus.kudielka@gmail.com</email>
</author>
<published>2023-11-07T17:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d0bbeafd82eac165c38242b1a928b86de7316df'/>
<id>urn:sha1:6d0bbeafd82eac165c38242b1a928b86de7316df</id>
<content type='text'>
commit 02d5fdbf4f2b8c406f7a4c98fa52aa181a11d733 upstream.

Background: Turris Omnia (Armada 385); eth2 (mvneta) connected to SFP bus;
SFP module is present, but no fiber connected, so definitely no carrier.

After booting, eth2 is down, but netdev LED trigger surprisingly reports
link active. Then, after "ip link set eth2 up", the link indicator goes
away - as I would have expected it from the beginning.

It turns out, that the default carrier state after netdev creation is
"carrier ok". Some ethernet drivers explicitly call netif_carrier_off
during probing, others (like mvneta) don't - which explains the current
behaviour: only when the device is brought up, phylink_start calls
netif_carrier_off.

Fix this for all drivers using phylink, by calling netif_carrier_off in
phylink_create.

Fixes: 089381b27abe ("leds: initial support for Turris Omnia LEDs")
Cc: stable@vger.kernel.org
Suggested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Klaus Kudielka &lt;klaus.kudielka@gmail.com&gt;
Reviewed-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: phylink: add phylink_limit_mac_speed()</title>
<updated>2023-08-26T01:55:18+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-08-24T13:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70934c7c99ad01778eef83e898df4c624e52492f'/>
<id>urn:sha1:70934c7c99ad01778eef83e898df4c624e52492f</id>
<content type='text'>
Add a function which can be used to limit the phylink MAC capabilities
to an upper speed limit.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Link: https://lore.kernel.org/r/E1qZAX3-005pTi-K1@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: Introduce PSGMII PHY interface mode</title>
<updated>2023-08-14T07:12:53+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>j4g8y7@gmail.com</email>
</author>
<published>2023-08-11T11:10:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83b5f0253b1ef352f4333c4fb2d24eff23045f6b'/>
<id>urn:sha1:83b5f0253b1ef352f4333c4fb2d24eff23045f6b</id>
<content type='text'>
The PSGMII interface is similar to QSGMII. The main difference
is that the PSGMII interface combines five SGMII lines into a
single link while in QSGMII only four lines are combined.

Similarly to the QSGMII, this interface mode might also needs
special handling within the MAC driver.

It is commonly used by Qualcomm with their QCA807x PHY series and
modern WiSoC-s.

Add definitions for the PHY layer to allow to express this type
of connection between the MAC and PHY.

Signed-off-by: Gabor Juhos &lt;j4g8y7@gmail.com&gt;
Signed-off-by: Robert Marko &lt;robert.marko@sartura.hr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phylink: explicitly invalidate link_state members in mac_config</title>
<updated>2023-07-25T13:02:03+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-22T20:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5714f68a76bcad3d2dbaafc5a7e98096f3b4c75'/>
<id>urn:sha1:c5714f68a76bcad3d2dbaafc5a7e98096f3b4c75</id>
<content type='text'>
Explicitly invalidate the phylink_link_state structure members in
mac_config that do not contain reliable information for this function,
thereby preventing their future incorrect use.

Reviewed-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Tested-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: phylink: strip out pre-March 2020 legacy code</title>
<updated>2023-07-25T13:02:03+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-22T20:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d72c3bb60dd9d5ea180f157bac72b4458112282'/>
<id>urn:sha1:4d72c3bb60dd9d5ea180f157bac72b4458112282</id>
<content type='text'>
Strip out all the pre-March 2020 legacy code from phylink now that the
last user of it is gone.

Reviewed-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Tested-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: phylink: remove legacy mac_an_restart() method</title>
<updated>2023-07-18T07:47:09+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-14T09:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76226787e137962750241bb29a9572dfc10d9eb1'/>
<id>urn:sha1:76226787e137962750241bb29a9572dfc10d9eb1</id>
<content type='text'>
The mac_an_restart() method is now completely unused, and has been
superseded by phylink_pcs support. Remove this method.

Since phylink_pcs_mac_an_restart() now only deals with the PCS, rename
the function to remove the _mac infix.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: phylink: add support for PCS link change notifications</title>
<updated>2023-07-14T07:51:48+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-13T08:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24699cc1ff3e633d7c3a0d3ef394243db11757ec'/>
<id>urn:sha1:24699cc1ff3e633d7c3a0d3ef394243db11757ec</id>
<content type='text'>
Add a function, phylink_pcs_change() which can be used by PCs drivers
to notify phylink about changes to the PCS link state.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phylink: add pcs_pre_config()/pcs_post_config() methods</title>
<updated>2023-07-14T07:51:47+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-13T08:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aee6098822ed8a298ad817da8339ba4c7ea381fe'/>
<id>urn:sha1:aee6098822ed8a298ad817da8339ba4c7ea381fe</id>
<content type='text'>
Add hooks that are called before and after the mac_config() call,
which will be needed to deal with errata workarounds for the
Marvell 88e639x DSA switches.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phylink: add pcs_enable()/pcs_disable() methods</title>
<updated>2023-07-14T07:51:47+00:00</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2023-07-13T08:42:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90ef0a7b0622c62758b2638604927867775479ea'/>
<id>urn:sha1:90ef0a7b0622c62758b2638604927867775479ea</id>
<content type='text'>
Add phylink PCS enable/disable callbacks that will allow us to place
IEEE 802.3 register compliant PCS in power-down mode while not being
used.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
