From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Smirl Date: Tue, 22 Mar 2005 03:06:30 +0000 Subject: Re: Rework of request firmware Message-Id: <9e4733910503211906211b7778@mail.gmail.com> List-Id: References: <9e473391050319200625032789@mail.gmail.com> In-Reply-To: <9e473391050319200625032789@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, 22 Mar 2005 03:25:05 +0100, Kay Sievers wrote: > This way we can replay or cancel events at any time if something goes > wrong. We would get a generic transaction model for the kernel to > request a configuration action from userspace like copying a firmware > image, setup a device or run any other userspace helper. > > How does that sound? Can this work? That's what I was trying to get at. It's the abort of the event that causes problems. The better model is that the event stays active until it is satisfied -- there is no way to automatically abort it. If the event has not been satisfied by module exit time it just gets cleaned up. It would be convenient to have a sysfs variable on an event like 'replay'. If I set 'replay' to 1 the event will get regenerated to /sbin/hotplug. After I fix things I could manually retrigger the event and it would run in the hotplug execution environment. You might not even need to be root to trigger a replay. Timeout is still useful. Timeout tells the system to generate a user message saying that the device is stuck. But timeout should not abort the event. What about a universal driver model for this? Right now we have probe(). Should we add post()? If post() is null just call probe(). If the driver has a post() function call it instead. The completion event would then call probe(). probe() could still fail and the driver would not be activated. Doing it in the driver layer makes this process standard. Now we can add a uniform device attribute like status. status=offline, status=posting, status=online. You could probably cancel an event. Canceling an event would remove it from sysfs and make sure probe() never gets called. Status would stay at offline. The only way to reactivate the device would be to remove the driver. I don't think we need cancel but if it is there it would be a user controlled action. -- Jon Smirl jonsmirl@gmail.com ------------------------------------------------------- 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_id396&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