lkml.org 
[lkml]   [2004]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Re: Load hid.o module synchronously?
    From
    Date
    Greg KH <greg@kroah.com> writes:

    > On Sat, May 01, 2004 at 09:21:31AM -0400, Patrick J. LoPresti wrote:
    >
    > > So there is no way to load this hardware driver and wait until it
    > > either binds or fails to bind to its associated hardware? That seems
    > > like a bad bug in the design...
    >
    > Um, what is wrong with the proposals I made for how you can detect
    > this?

    Your proposals were:

    - look at the device in /proc/bus/usb/devices and wait until the
    driver is bound to that device "(hid)" will show up as the
    driver bound to that interface

    - look at the sysfs directory for the hid driver and wait for
    the symlink to the device shows up. This should be at
    /sys/bus/usb/drivers/hid

    I see how these let me wait until the hid.o module successfully binds
    to the hardware.

    But what if it fails to bind? For example, what if an error occurs?
    Or what if the keyboard is on the module's blacklist? How do I know
    when to stop waiting?

    Ideally, what I would like is for "modprobe <driver>" to wait until
    all hardware handled by that driver is either ready for use or is
    never going to be. That seems simple and natural to me. But I would
    be glad to use any other mechanism to achieve the same effect; I just
    have not seen one yet.

    - Pat
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:02    [W:6.833 / U:0.380 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site