mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <kabel@kernel.org>
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 14:08:35 +0100	[thread overview]
Message-ID: <b052c43c-5f4c-4cfa-8779-3dc66a451c4e@lunn.ch> (raw)
In-Reply-To: <20231208075804.4f8559e6@dellmb>

> What if the netdev does not have a PHY? The MAC also has speed
> information.

The ethtool API provides a list of link modes the MAC supports:

/usr/sbin/ethtool enp2s0
Settings for enp2s0:
	Supported ports: [ TP	 MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full

The MAC driver can provide this information by calling into phylib or
phylink, or it can do it some other way. In fact, none of the LED code
goes direct to the PHY when determining when to blink in software, its
all via the struct net_device.

We should use the ethtool API to determine which speed sysfs files
should exist.

       Andrew

      reply	other threads:[~2023-12-08 13:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28  4:00 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
2023-12-08 13:08       ` Andrew Lunn [this message]

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=b052c43c-5f4c-4cfa-8779-3dc66a451c4e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=kabel@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®