From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Christian Lamparter <chunkeey@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-leds@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Jacek Anaszewski" <jacek.anaszewski@gmail.com>
Subject: [v2] leds: fix regression in usbport led trigger
Date: Fri, 18 Jan 2019 09:56:52 +0100 [thread overview]
Message-ID: <20190118085652.GA16561@kroah.com> (raw)
On Fri, Jan 11, 2019 at 05:29:45PM +0100, Christian Lamparter wrote:
> The patch "usb: simplify usbport trigger" together with "leds: triggers:
> add device attribute support" caused an regression for the usbport
> trigger. it will no longer enumerate any active usb hub ports under the
> "ports" directory in the sysfs class directory, if the usb host drivers
> are fully initialized before the usbport trigger was loaded.
>
> The reason is that the usbport driver tries to register the sysfs
> entries during the activate() callback. And this will fail with -2 /
> ENOENT because the patch "leds: triggers: add device attribute support"
> made it so that the sysfs "ports" group was only being added after the
> activate() callback succeeded.
>
> This version of the patch reverts parts of the "usb: simplify usbport
> trigger" patch and restores usbport trigger's functionality.
This feels like going backwards, as a driver should not be adding and
removing sysfs groups, because you race with userspace. Userspace has
no idea that the new sysfs files were added or removed, right?
I'll apply this, but this feels like a problem in the led api if the
above really is true.
also, please wrap your changelogs at 72 columns, making it easier to
read. I did that here for you...
thanks,
greg k-h
next reply other threads:[~2019-01-18 8:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 8:56 Greg Kroah-Hartman [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-18 9:44 [v2] leds: fix regression in usbport led trigger Uwe Kleine-König
2019-01-18 9:28 Greg Kroah-Hartman
2019-01-18 9:22 Uwe Kleine-König
2019-01-18 9:13 Greg Kroah-Hartman
2019-01-18 9:07 Uwe Kleine-König
2019-01-11 16:29 Christian Lamparter
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=20190118085652.GA16561@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chunkeey@gmail.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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.