netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Josua Mayer <josua@solid-run.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH RFC] net: sfp: support assigning status LEDs to SFP connectors
Date: Mon, 9 May 2022 14:49:59 +0200	[thread overview]
Message-ID: <YnkN954Wb7ioPkru@lunn.ch> (raw)
In-Reply-To: <20220509122938.14651-1-josua@solid-run.com>

On Mon, May 09, 2022 at 03:29:38PM +0300, Josua Mayer wrote:
> Dear Maintainers,
> 
> I am working on a new device based on the LX2160A platform, that exposes
> 16 sfp connectors, each with its own led controlled by gpios intended
> to show link status.

Can you define link status? It is a messy concept with SFPs. Is it
!LOS? I guess not, because you would not of used a GPIO, just hard
wired it. Does it mean the SERDES has sync? Does it reflect the netdev
carrier status?

> We have found that there is a way in sysfs to echo the name of the network
> device to the api of the led driver, and it will start showing link status.
> However this has to be done at runtime by the user.

Please take a look at the patches Ansuel Smith submitted last week,
maybe the week before last.

> On the Layerscape platform in particular these devices are created dynamically
> by the networkign coprocessor, which supports complex functions such as
> creating one network interface that spans multiple ports.

The linux model is that each MAC has a netdev, hence a name. If you
need to span multiple ports, you then add a bridge and add the MACs to
the bridge. So there should not be an issue here.

> It seems to me that the netdev trigger therefore can not properly reflect
> the relation between an LED (which is hard-wired to an sfp cage), and the
> link state reported by e.g. a phy inside an sfp module.

The netdev carrier will correctly reflect this.

> You may notice that again leds are tied to existence of a particular logical
> network interface, which may or may not exist, and may span multiple
> physical interfaces in case of layerscape.

As far as i'm aware, the in kernel code always has a netdev for each
MAC. Are you talking about the vendor stack?

	Andrew

  reply	other threads:[~2022-05-09 12:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 12:29 [PATCH RFC] net: sfp: support assigning status LEDs to SFP connectors Josua Mayer
2022-05-09 12:49 ` Andrew Lunn [this message]
2022-05-10  8:56   ` Josua Mayer
2022-05-10 12:13     ` Andrew Lunn
2022-05-11 10:26       ` Russell King (Oracle)
2022-05-11 14:48         ` Ioana Ciornei
2022-05-11 10:12     ` Russell King (Oracle)
2022-05-11 15:48     ` Ioana Ciornei
2022-05-18  7:42       ` Josua Mayer
2022-05-09 15:54 ` Russell King (Oracle)
2022-05-10  9:44   ` Josua Mayer
2022-05-11 10:21     ` Russell King (Oracle)
2022-05-11 13:22     ` Ioana Ciornei
2022-05-11 13:39       ` Russell King (Oracle)
2022-06-01 10:18         ` Josua Mayer
2022-06-01 10:52           ` Russell King (Oracle)

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=YnkN954Wb7ioPkru@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=josua@solid-run.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).