[ this should actually go on the [EMAIL PROTECTED]
list, by the way -- the SUSE list should no longer be in use ]


----- Original Message ----- 
From: "Barak Cohen" <[EMAIL PROTECTED]>
To: "'David Brownell '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "Barak Cohen" <[EMAIL PROTECTED]>
Sent: Friday, 11 August, 2000 10:34 AM
Subject: RE: [linux-usb] Kernel driver question


> Thanks for your answer David,
> 
> nevertheless, if I want something generic that I can choose which driver I
> want to replace... Is there some central place that the usb-core driver
> searches to know which driver to load ? 

The best way to think about it is that there are two lists:

    - One inside the kernel.  Once the driver is loaded, it
      controls what devices use it ... so if "printer" is
      loaded you currently have no way to prevent it from
      claiming your device if it wants to.

    - One outside the kernel.  This one does what you describe
      below ... but is subject to the limitation above.

Since you had specifically identified a complete substitution of one
driver for another, you shouldn't care about that limitation.


> besides, sometimes, a more appropriate than the generic class driver that is
> provided in the Linux USb baseline is needed. In general, the "Universal USB
> rules" say, first load the specific vendor/product driver than if no such
> driver is available load the class/subclass driver. How this scheme works
> under Linux ?

Go look at the scripts I pointed you at.  They first scan for
device-specific info, and only then for class or interface
specific bindings.

Someday I would expect to see user space programs have more
complete control over driver binding, but for now we have to
live without that functionality.

- Dave



> 
> Thanks
> 
> Barak
> 
> 
> -----Original Message-----
> From: David Brownell
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Sent: 8/11/2000 6:52 PM
> Subject: Re: [linux-usb] Kernel driver question
> 
> For a modular kernel, you can use the USBD scripts
> available from the www.linux-usb.org website.  (The
> FAQ is a place to start, but this question isn't
> there ...)  Then the /etc/usb/drivers/printer config
> script just gets replaced with something that knows
> to load the "mydriver" module instead.
> 
> For a static kernel, you'll need to swap out the
> "printer.o" for "mydriver.o".
> 
> - Dave
> 
> 
> ----- Original Message ----- 
> From: "barak cohen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, 11 August, 2000 9:38 AM
> Subject: [linux-usb] Kernel driver question
> 
> 
> > Hello Folks,
> > 
> > I want to write a USB device driver that is commutative to current one
> (i.e.
> > i want to load mydriver.o instead a current one lets say printer.o).
> In
> > addition I want to be able to control is the system loads the original
> > driver or my driver (I guess I can do it manually with rmmod and
> insmod). My
> > question is, what should I do in terms of configuration in order for
> the USB
> > core under linux to know which driver to load...
> > 
> > Thanks
> > 
> > Barak
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to