Re: [PATCH net v2] net: phy: c45: select BASE-T1 type for the forced speed
From: Andrew Lunn
Date: Mon Nov 09 2026 - 13:11:13 EST
> +/* Type selection value for the BASE-T1 PMA/PMD control register (1.2100,
> + * 802.3-2022 Table 45-178) matching the forced speed. 10 Mbit/s is ambiguous
> + * between 10BASE-T1L and 10BASE-T1S, so the supported link modes decide.
> + * 2.5G, 5G and 10GBASE-T1 are not handled as there are no link modes for them
> + * yet.
> + */
> +static int genphy_c45_baset1_type_sel(struct phy_device *phydev)
> +{
> + switch (phydev->speed) {
> + case SPEED_100:
> + return MDIO_PMA_PMD_BT1_CTRL_TYPE_SEL_100BT1;
> + case SPEED_1000:
> + return MDIO_PMA_PMD_BT1_CTRL_TYPE_SEL_1000BT1;
> + case SPEED_10:
> + if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT,
Overall, this looks good. A nitpick, please could you sort these by
speed. I can see why you put them in this order, 802.3 lists the bits
in this order. But many kernel developers don't seem to read 802.3
that closely.
With this changed, please add: Reviewed-by: Andrew Lunn
<andrew@xxxxxxx>
Andrew
---
pw-bot: cr