lkml.org 
[lkml]   [2023]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G
On Thu, Dec 07, 2023 at 06:11:29PM +0100, Andrew Lunn wrote:
> On Thu, Dec 07, 2023 at 05:29:23PM +0100, Marek Behún wrote:
> > On Tue, 28 Nov 2023 04:00:10 +0000
> > Daniel Golle <daniel@makrotopia.org> wrote:
> >
> > > Add 2.5G, 5G and 10G as available speeds to the netdev LED trigger.
> > >
> > > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> > > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> >
> > So what will happen when there are more speeds? Will we create a
> > separate file for each speed?
> >
> > Will we have a separate sysfs file for 10, 100, 1000, 2500, 5000,
> > 10000, 20000, 25000, 40000, 50000, 56000, 100000, 200000, 400000,
> > 800000 ?

Yes, why not?

I also doubt we are doing to have 800GBit/s on RJ-45 copper any time
soon. And speed-indication is generally only needed for media which
supports more than one speed (ie. twisted copper pair).

> >
> > These are all speeds from include/uapi/linux/ethtool.h.
> >
> > Maybe we should have reused ethtool link mode bits, or something...
>
> That gets pretty ugly. The bits are not in any logical order, since
> they just get appended onto the end as needed.
>
> > Also, the files should only be present if the requested speed is
> > supported by the net device. So if 2500 mbps is not supported, there
> > should no be link_2500.
>
> Yes, this would be nice. We have the information in the phy_setting
> settings[] table in phy-core.c.

I agree on that, it would be an additional patch though because that
obviously goes beyond adding some more speeds.

\
 
 \ /
  Last update: 2023-12-07 18:23    [W:0.119 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site