All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Ben Whitten <ben.whitten@gmail.com>, Dan Murphy <dmurphy@ti.com>,
	linux-leds@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: leds: netdev trigger - misleading link state indication at boot
Date: Wed, 4 Aug 2021 18:01:54 +0200	[thread overview]
Message-ID: <20210804160154.GD25072@amd> (raw)
In-Reply-To: <20210413182051.GR1463@shell.armlinux.org.uk>

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

Hi!

> I'm seeing some odd behaviour with the netdev trigger and some WiFi
> interfaces.
> 
> When the WiFi interface has never been brought up (so is in an
> operationally disabled state), if I bind a LED to the netdev
> trigger, setting the device_name to the WiFi interface name and
> enable the "link" property, the LED illuminates, indicating that
> the WiFi device has link - but it's disabled.
> 
> If I up/down the WiFi interface, thereby returning it to the
> original state, the link LED goes out.
> 
> I suspect ledtrig-netdev.c needs to check that the device is both
> up (dev->flags & IFF_UP) and netif_carrier_ok(dev) both return true,
> rather than just relying on netif_carrier_ok(). I don't think using
> netif_running() is appropriate, as that will return true before
> ndo_open() has been called to initialise the carrier state.
> 
> Agreed?

Seems reasonable to me. Will you do the patch?

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2021-08-04 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 18:20 leds: netdev trigger - misleading link state indication at boot Russell King - ARM Linux admin
2021-08-04 16:01 ` Pavel Machek [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=20210804160154.GD25072@amd \
    --to=pavel@ucw.cz \
    --cc=ben.whitten@gmail.com \
    --cc=dmurphy@ti.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.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 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.