[PATCH v2 7/8] net: ti: iccsg-prueth: Add necessary functions for SR1.0 support

Andrew Lunn andrew at lunn.ch
Wed Jan 17 12:56:14 PST 2024


> +static void emac_change_port_speed_duplex_sr1(struct prueth_emac *emac)
> +{
> +	u32 cmd = ICSSG_PSTATE_SPEED_DUPLEX_CMD, val;
> +	struct prueth *prueth = emac->prueth;
> +	int slice = prueth_emac_slice(emac);
> +
> +	/* only full duplex supported for now */
> +	if (emac->duplex != DUPLEX_FULL)
> +		return;

You should tell phylib this, after connecting to the PHY. If you look
around you will find code like:

engleder/tsnep_main.c:	phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
engleder/tsnep_main.c:	phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT);
engleder/tsnep_main.c:	phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);

The PHY will then not advertise the half duplex modes, and probably
ethtool will be disallowed to force a half duplex mode.

	Andrwe



More information about the linux-arm-kernel mailing list