[PATCH RFC net-next 15/16] net: phylink: add negotiation of in-band capabilities

Andrew Lunn andrew at lunn.ch
Tue Nov 26 13:18:56 PST 2024


> +		if (pcs_ib_caps && pcs_ib_caps != LINK_INBAND_DISABLE) {
> +			/* PCS supports reporting in-band capabilities, and
> +			 * supports more than disable mode.
> +			 */
> +			if (pcs_ib_caps & LINK_INBAND_DISABLE)
> +				neg_mode = PHYLINK_PCS_NEG_OUTBAND;
> +			else if (pcs_ib_caps & LINK_INBAND_ENABLE)
> +				pcs_ib_only = true;
> +		}
> +
> +		if (phy_ib_caps && phy_ib_caps != LINK_INBAND_DISABLE) {
> +			/* PHY supports in-band capabilities, and supports
> +			 * more than disable mode.
> +			 */
> +			if (phy_ib_caps & LINK_INBAND_DISABLE)
> +				pl->phy_ib_mode = LINK_INBAND_DISABLE;
> +			else if (phy_ib_caps & LINK_INBAND_BYPASS)
> +				pl->phy_ib_mode = LINK_INBAND_BYPASS;
> +			else if (phy_ib_caps & LINK_INBAND_ENABLE)
> +				phy_ib_only = true;

Looking at the different handling between PCS and PHY, i asked myself,
does PCS BYPASS exist? If it is invalid, i don't see a check if the
PCS is reporting it and should we be issuing a warning?

    Andrew



More information about the Linux-mediatek mailing list