linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Rework of request firmware
Date: Mon, 21 Mar 2005 02:37:00 +0000	[thread overview]
Message-ID: <1111372620.23995.202.camel@localhost.localdomain> (raw)
In-Reply-To: <9e473391050319200625032789@mail.gmail.com>

On Sun, 2005-03-20 at 15:39 -0500, Jon Smirl wrote:
> On Sun, 20 Mar 2005 21:25:17 +0100, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > Could you please define the requirements for that subsystem _first_ and
> > make sure that everything we currently know of is covered before adding
> > stuff to the core. I'm pretty sure that this will have to change several
> > times before we get that right.
> 
> The base device support is missing two things I need:
> 1) some mechanism to run the POST program

I've put that on the list below.

> 2) subdirectories under class_device for hotplug monitors

Childs of class devices is somewhere on Greg's list, I think. :)
Don't know how close we are to allow that. Greg?

> I don't know enough about the details of how the hotplug subsystem
> works, plus I have a lot of work I still need to do the framebuffer
> subsystem.  I'll work around these items until a fix is in place.

We want:
====
 o To request data(file) like firmware or setup data from userspace
   into kernel memory, to use it in the device driver.
 o To request the execution of a userspace program to setup the device
   for the kernel while the kernel waits for the program to complete.

We currently have:
=========
 o call_usermodehelper()
 o request_firmware()
 o kobject_hotplug() executes /sbin/hotplug

Current problems:
======== o call_usermodehelper will not work if userspace is not ready to fulfill
   the request at bootup or we are in suspend/resume.
 o Same for request_firmware, it has a async version nobody uses,
   but it may be good starting point. I have seen several oops's of
   request_firmware if the timeout tries to cancel the request.
 o Both versions can not be replayed without the content of the original
   hotplug environment.
 o If a request fails and the module can not be removed, how can we
   probe the device again?

Requirements:
====== o Provide core functionality to request a userspace action for a
   specific device.
 o The events should be send through /sbin/hotplug and we get the
   netlink events along with the same call.
 o The request should be able to wait as long as the system/userspace
   needs to fulfill the request or actively cancels it.
 o It should be possible to fulfill the request later, without
   the hotplug environment available.
 o userspace should be notified about any failing operation to react
   accordingly.
 o Be able to request more than one action for a single device:
   one after the other or in parallel, but with its current state
   visible to userspace.
 o We need a way to let /sbin/hotplug recognize the kind of event,
   to avoid running an agent for every device.

Questions:
=====
 o How do we reprobe a device if we can't unload the module?
 o From which DEVPATH should the requests originate from?
   The module itself in sysfs, the physical device, the class
   device? Or stick with with our own temporary class device
   for the requests?
 o Do we need any timeout? If yes, how is that to be handled?
 o Will all users/probers be able to schedule its work
   until the request comes back from userspace? 

Possible implementations:
============1. We keep the current class_device logic for loading firmware but
   switch everything over to the async version without the timeout.
   And we add new functionality for the configuration requests.

2. Drivers they want to emit requests create attributes in the devices
   sysfs representation and send out hotplug events with a specific
   action.

3. We add a child for every request below the device that requests
   the actual action. This child device has the attributes to control
   the request.


Any ideas?

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

  parent reply	other threads:[~2005-03-21  2:37 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
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 [this message]
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=1111372620.23995.202.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).