[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251128072351.GB2580184@black.igk.intel.com>
Date: Fri, 28 Nov 2025 08:23:51 +0100
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, Yehezkel Bernat <YehezkelShB@...il.com>,
Ian MacDonald <ian@...statz.com>,
Salvatore Bonaccorso <carnil@...ian.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 3/3] net: thunderbolt: Allow reading link
settings
On Thu, Nov 27, 2025 at 08:20:53PM +0100, Andrew Lunn wrote:
> > +static int tbnet_get_link_ksettings(struct net_device *dev,
> > + struct ethtool_link_ksettings *cmd)
> > +{
> > + const struct tbnet *net = netdev_priv(dev);
> > + const struct tb_xdomain *xd = net->xd;
> > + int speed;
> > +
> > + ethtool_link_ksettings_zero_link_mode(cmd, supported);
> > + ethtool_link_ksettings_zero_link_mode(cmd, advertising);
> > +
> > + /* Figure out the current link speed and width */
> > + switch (xd->link_speed) {
> > + case 40:
> > + /* For Gen 4 80G symmetric link the closest one
> > + * available is 56G so we report that.
> > + */
> > + ethtool_link_ksettings_add_link_mode(cmd, supported,
> > + 56000baseKR4_Full);
> > + ethtool_link_ksettings_add_link_mode(cmd, advertising,
> > + 56000baseKR4_Full);
> > + speed = SPEED_56000;
>
> Please add SPEED_80000.
Sure. One additional question though. Comment on top of SPEED_ definitions
suggest changing __get_link_speed() of the bonding driver accordingly but
it basically converts from SPEED_ to AD_LINK_SPEED_ which I think we need
to add too. However, these are user-facing values so should I add the
AD_LINK_SPEED_80000 entry to the end of that enum to avoid any possible
breakage?
> I commented on the previous version. Is supported and advertising
> actually needed? If not, please leave them blank.
I don't think they are needed (but I'll double check).
Powered by blists - more mailing lists