[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190605100337.GA9350@kroah.com>
Date: Wed, 5 Jun 2019 12:03:37 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Eugeniu Rosca <erosca@...adit-jv.com>
Cc: David Howells <dhowells@...hat.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alan Stern <stern@...land.harvard.edu>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Nicolas Boichat <drinkcat@...omium.org>,
Mathias Payer <mathias.payer@...elwelt.net>,
Kento Kobayashi <Kento.A.Kobayashi@...y.com>,
Hui Peng <benquike@...il.com>,
Raul E Rangel <rrangel@...omium.org>,
Douglas Anderson <dianders@...omium.org>,
Jan-Marek Glogowski <glogow@...home.de>,
Bin Liu <b-liu@...com>,
Colin Ian King <colin.king@...onical.com>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Jon Flatley <jflat@...omium.org>,
Mathieu Malaterre <malat@...ian.org>,
Spyridon Papageorgiou <spapageorgiou@...adit-jv.com>,
Eugeniu Rosca <roscaeugeniu@...il.com>,
Joshua Frkuska <joshua_frkuska@...tor.com>,
"George G . Davis" <george_davis@...tor.com>,
yuichi.kusakabe@...so-ten.com, yohhei.fukui@...so-ten.com,
natsumi.kamei@...so-ten.com, yasano@...adit-jv.com
Subject: Re: [PATCH] usb: hub: report failure to enumerate uevent to userspace
On Wed, Jun 05, 2019 at 11:05:56AM +0200, Eugeniu Rosca wrote:
> From: Spyridon Papageorgiou <spapageorgiou@...adit-jv.com>
>
> When a USB device fails to enumerate, only a kernel message is printed.
> With this patch, a uevent is also generated to notify userspace.
> Services can monitor for the event through udev and handle failures
> accordingly.
>
> The "port_enumerate_fail_notify()" function name follows the syntax of
> "port_over_current_notify()" used in v4.20-rc1
> commit 201af55da8a398 ("usb: core: added uevent for over-current").
>
> Signed-off-by: Spyridon Papageorgiou <spapageorgiou@...adit-jv.com>
> Signed-off-by: Eugeniu Rosca <erosca@...adit-jv.com>
All we need is one special notifier! ...
{grumble}
This can end up causing loads of new kobject change events to be added,
overloading what uevents were supposed to be in the first place
(add/remove of sysfs objects).
I just talked with David Howells, and this type of thing really should
be tied into the new "notifier" interface/api. That way you can
register for any specific type of event and just get notified of them
when they happen. No need to mess with uevents.
See his posts on linux-api starting with:
Subject: [RFC][PATCH 0/8] Mount, FS, Block and Keyrings notifications [ver #2]
for the proposal.
If we added USB (or really any hardware events) to that interface, would
it solve the issue you are trying to solve here?
thanks,
greg k-h
Powered by blists - more mailing lists