Re: [PATCH] net: phy: microchip_t1: LAN887X: Fix device init issues.
From: Andrew Lunn
Date: Mon Oct 06 2025 - 14:44:59 EST
> phy_sanitize_settings() is supposed to pick the least supported
> speed from the supported list when speed is not initialized.
What makes you think it should pick the slowest speed? The kdoc for
the function is:
/**
* phy_sanitize_settings - make sure the PHY is set to supported speed and duplex
* @phydev: the target phy_device struct
*
* Description: Make sure the PHY is set to supported speeds and
* duplexes. Drop down by one in this order: 1000/FULL,
* 1000/HALF, 100/FULL, 100/HALF, 10/FULL, 10/HALF.
So it should pick 1000Full if available. If not it will try 1000Half,
if not 100Full etc.
And the comment is actually a bit out of date. It will actually start
from 800G Full, 400G Full, 200G Full, 100G Full, not that anybody does
Copper at these speeds.
Andrew