From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Rework of request firmware
Date: Sun, 20 Mar 2005 19:17:55 +0000 [thread overview]
Message-ID: <1111346275.23995.39.camel@localhost.localdomain> (raw)
In-Reply-To: <9e473391050319200625032789@mail.gmail.com>
On Sun, 2005-03-20 at 13:24 -0500, Jon Smirl wrote:
> On Sun, 20 Mar 2005 18:52:12 +0100, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > o Emit events for devices to request a userspace-action on that
> > device like copying data into a sysfs file or run a userspace
> > program to setup this device.
> > -Is this limited to physical devices?
>
> Do virtual devices have a 'struct device' too? It could be generalized
> even more to work off from a kobject instead of device.
No, class devices have only a pointer to struct device.
> > o Events can happen anytime, not only on device creation time.
>
> true, I also have a problem with monitor hotplug needing to run a user
> space helper.
>
> > o We need an efficient way for the dumb hotplug-multiplexer to recognize
> > that kind of events to prevent the execution of just another script
> > for every hotplug event.
> >
> > o The events should act asynchronously and the kernel should detect or is
> > to be notified that the request has finished.
> > -Do we need any timeout here?
>
> Timeout may the source of a problem. If user space is messed up and
> the event doesn't get run correctly the timeout happens. Timeout
> removes the attributes and reports an error. Now the user fixes
> whatever was wrong in user space. How do they restart the event?
>
> It might be better to get rid of the timeouts and just leave
> everything in place. Then you could just rerun the user space app that
> failed.
How can we remove the module with a waiting request? Cancel the request
it sysfs first?
And yes, good question: How do we trigger a new init if it has failed
the first time? Seems we need the userspace driver binding stuff. Greg?
> > o For data-loading-requests like the firmware case we need to be able to
> > request more than one file for one single device.
>
> I would just do these sequentially. If everything is working the loads
> happen quickly.
>
> > o The DEVPATH of the request should be the device itself, that asks for data
> > or setup.
> > -Should the requests create a own child at the device directory or just
> > attributes there?
>
> Doesn't creating a directory cause a hotplug add event?
You can easily prevent that with a hotplug-filter.
> There are only
> two attributes: status and data. We could just pick standard names for
> them. Alternatively those two attributes could always be present in
> the device directory reporting a status of inactive.
It would be nice to get the state of the request-waiting device at any
time from sysfs and not only with the environment of the hotplug event.
> > -How should attributes be named if we have multiple request for the
> > same device?
>
> I would not allow this
Hmm, if we never need this, that's fine. But we need to make sure before
we implement it. Otherwise we will run into problems and start
everything again. :)
If we create child devices below the requesting object, we would get our
own subsystem parameter and /sbin/hotplug can act only on that and does
not need to filter all events...
Attributes at the device itself may look easier in the first place, but
we need to check that carefully to cover the requirements.
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-03-20 19:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-20 4:06 Rework of request firmware Jon Smirl
2005-03-20 13:37 ` Kay Sievers
2005-03-20 15:35 ` Jon Smirl
2005-03-20 16:47 ` Jon Smirl
2005-03-20 17:16 ` Kay Sievers
2005-03-20 17:19 ` David Zeuthen
2005-03-20 17:39 ` Kay Sievers
2005-03-20 17:52 ` Kay Sievers
2005-03-20 17:52 ` Darren Salt
2005-03-20 18:00 ` Kay Sievers
2005-03-20 18:24 ` Jon Smirl
2005-03-20 19:02 ` Jon Smirl
2005-03-20 19:17 ` Kay Sievers [this message]
2005-03-20 19:27 ` Kay Sievers
2005-03-20 19:50 ` Jon Smirl
2005-03-20 20:25 ` Kay Sievers
2005-03-20 20:39 ` Jon Smirl
2005-03-21 2:37 ` Kay Sievers
2005-03-22 0:29 ` Linas Vepstas
2005-03-22 2:25 ` Kay Sievers
2005-03-22 3:06 ` Jon Smirl
2005-03-22 8:27 ` Roman Kagan
2005-03-22 10:45 ` Kay Sievers
2005-03-22 10:55 ` Kay Sievers
2005-03-22 14:37 ` Jon Smirl
2005-03-22 17:53 ` Linas Vepstas
2005-03-22 18:09 ` Linas Vepstas
2005-03-22 18:43 ` Jon Smirl
2005-03-23 1:08 ` Greg KH
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=1111346275.23995.39.camel@localhost.localdomain \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@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 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).