linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Pavel Machek" <pavel@ucw.cz>, "Lee Jones" <lee@kernel.org>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Christian Marangi" <ansuelsmth@gmail.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Marek Behún" <kabel@kernel.org>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Li Zetao" <lizetao1@huawei.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 net-next] leds: trigger: netdev: Add support for tx_err and rx_err notification with LEDs
Date: Wed, 10 Jul 2024 15:49:37 +0200	[thread overview]
Message-ID: <20240710154937.0dbcbd0c@wsk> (raw)
In-Reply-To: <8c8ba30d-dbec-47db-ae8c-a734fb2468c0@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

Hi Andrew,

> On Wed, Jul 10, 2024 at 12:06:51PM +0200, Lukasz Majewski wrote:
> > This patch provides support for enabling blinking of LEDs when RX
> > or TX errors are detected.
> > 
> > Approach taken in this patch is similar to one for TX or RX data
> > transmission indication (i.e. TRIGGER_NETDEV_TX/RX attribute).
> > 
> > One can inspect transmission errors with:
> > ip -s link show eth0
> > 
> > Example LED configuration:
> > cd /sys/devices/platform/amba_pl@0/a001a000.leds/leds/
> > echo netdev > mode:blue/trigger && \
> > echo eth0 > mode:blue/device_name && \
> > echo 1 > mode:blue/tx_err  
> 
> When i look at the machines around me, they all have an error count of
> 0. 

This is mostly true for ethernet. However, it happens on some low-level
drivers that errors field is not zero when e.g. the received frame is
malformed due to harsh work environment.

> Do you have a real customer use case for this? 

Yes.

The problem is apparent mostly with can interfaces and transmission for
it.

> What sort of systems
> do you have which do have sufficient errors to justify an LED?

In my case it is an embedded industrial/automotive controller with 10+
RGB LEDs. It only has LEDs to communicate with user.

The way how and when they blink shows the status of the device.

With this patch one is able to spot if some transmission is failing
(among other things).

> 
> There is no standardisation of LEDs. Every vendor implements something
> different. What i don't want is lots of different blink patterns,
> which nobody ever uses.

As you can assess from the code - this patch extends neatly the current
code, with use case valid for my customer.

> 
> 	Andrew




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-07-10 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 10:06 [PATCH v1 net-next] leds: trigger: netdev: Add support for tx_err and rx_err notification with LEDs Lukasz Majewski
2024-07-10 13:33 ` Andrew Lunn
2024-07-10 13:49   ` Lukasz Majewski [this message]
2024-07-10 14:46 ` Andrew Lunn
2024-07-25  8:54 ` (subset) " Lee Jones

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=20240710154937.0dbcbd0c@wsk \
    --to=lukma@denx.de \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=hkallweit1@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).