All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Daniel Golle <daniel@makrotopia.org>, Lee Jones <lee@kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Jakub Kicinski <kuba@kernel.org>,
	Christian Marangi <ansuelsmth@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Li Zetao <lizetao1@huawei.com>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G
Date: Fri, 8 Dec 2023 07:58:04 +0100	[thread overview]
Message-ID: <20231208075804.4f8559e6@dellmb> (raw)
In-Reply-To: <cdcab57e-ef73-436d-8dac-f92219e4cbf9@lunn.ch>

On Thu, 7 Dec 2023 18:11:29 +0100
Andrew Lunn <andrew@lunn.ch> 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 ?
> > 
> > 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.

What if the netdev does not have a PHY? The MAC also has speed
information. Maybe create a function
  bool dev_supports_speed(netdev, speed)
?

Marek

  parent reply	other threads:[~2023-12-08  6:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28  4:00 [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G Daniel Golle
2023-11-28  4:00 ` [PATCH v3 2/2] docs: ABI: sysfs-class-led-trigger-netdev: add new modes and entry Daniel Golle
2023-12-07 16:30   ` Marek Behún
2023-12-01 10:57 ` [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G Lee Jones
2023-12-11 15:57   ` Christian Marangi
2023-12-11 16:46     ` Jakub Kicinski
2023-12-11 21:53       ` Christian Marangi
2023-12-11 22:05         ` Jakub Kicinski
2023-12-11 22:17           ` Christian Marangi
2023-12-13  9:56             ` Andrew Lunn
2023-12-13 11:27           ` [GIT PULL] Immutable branch between LEDs and NetDev due for the v6.8 merge window:wq Lee Jones
2023-12-13 12:05             ` Marek Behún
2023-12-13 15:39               ` Jakub Kicinski
2023-12-07 16:29 ` [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G Marek Behún
2023-12-07 17:11   ` Andrew Lunn
2023-12-07 17:22     ` Daniel Golle
2023-12-08  6:58     ` Marek Behún [this message]
2023-12-08 13:08       ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231208075804.4f8559e6@dellmb \
    --to=kabel@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.