Re: [v2, net-next 09/12] bng_en: Add ethtool link settings and capabilities support

From: Andrew Lunn

Date: Sat Nov 15 2025 - 16:08:37 EST


> +static void bnge_get_ethtool_modes(struct bnge_net *bn,
> + struct ethtool_link_ksettings *lk_ksettings)
> +{
> + struct bnge_dev *bd = bn->bd;
> + struct bnge_ethtool_link_info *elink_info = &bn->eth_link_info;
> + struct bnge_link_info *link_info = &bd->link_info;

Reverse Christmas tree please. And other functions have the same
problem.

> +
> + if (!(bd->phy_flags & BNGE_PHY_FL_NO_PAUSE)) {
> + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT,
> + lk_ksettings->link_modes.supported);
> + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> + lk_ksettings->link_modes.supported);
> + }
> +
> + if (link_info->support_auto_speeds || link_info->support_auto_speeds2 ||
> + link_info->support_pam4_auto_speeds)
> + linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
> + lk_ksettings->link_modes.supported);

autoneg is more than speed. In fact, 1000BaseX only works are 1G, no
link speed negotiation, but you can negotiate pause. Do any of the
link modes you support work like this?

> + /* Note ETHTOOL_LINK_MODE_10baseT_Half_BIT == 0 is a legal Linux
> + * link mode, but since no such devices exist

10BaseT Half devices definitely do exist, and there are actually more
appearing in the automotive field.


Andrew

---
pw-bot: cr