]> www.infradead.org Git - users/hch/misc.git/commitdiff
Merge branch 'support-loopback-mode-speed-selection'
authorPaolo Abeni <pabeni@redhat.com>
Thu, 20 Mar 2025 07:45:11 +0000 (08:45 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 20 Mar 2025 07:45:11 +0000 (08:45 +0100)
Gerhard Engleder says:

====================
Support loopback mode speed selection

Previously to commit 6ff3cddc365b ("net: phylib: do not disable autoneg
for fixed speeds >= 1G") it was possible to select the speed of the
loopback mode by configuring a fixed speed before enabling the loopback
mode. Now autoneg is always enabled for >= 1G and a fixed speed of >= 1G
requires successful autoneg. Thus, the speed of the loopback mode depends
on the link partner for >= 1G. There is no technical reason to depend on
the link partner for loopback mode. With this behavior the loopback mode
is less useful for testing.

Allow PHYs to support optional speed selection for the loopback mode.
This support is implemented for the generic loopback support and for PHY
drivers, which obviously support speed selection for loopback mode.
Additionally, loopback support according to the data sheet is added to
the KSZ9031 PHY.

Extend phy_loopback() to signal link up and down if speed changes,
because a new link speed requires link up signalling.

Use this loopback speed selection in the tsnep driver to select the
loopback mode speed depending the previously active speed. User space
tests with 100 Mbps and 1 Gbps loopback are possible again.
====================

Link: https://patch.msgid.link/20250312203010.47429-1-gerhard@engleder-embedded.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Trivial merge