Subject: Re: Lkm & usb
To: Vincent <10.50@free.fr>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-kern
Date: 05/06/2004 21:29:39
Le Thu, 6 May 2004 21:04:19 +0200
Vincent a ecrit :
> I'm always in the process of developing my new USB camera driver. I
> decided to embed it in a LKM to help testing and debugging.

Good choice.

> However, if I can load the lkm driver okay, the system seems not to be
> aware of it, that is, when I switch the camera on, it stills attaches it
> to ugen rather than ucams.
> 
> Wherefore, I'd have liked to know if there is a special function to call
> inside lkmload ( ) to have the driver registered and/or attached to
> usb*. Or if I still should declare to config a fake driver to be
> replaced by the LKM at load time.

Yes, there is some trickery to perform.  I can help, but it'd be easier
with a look at the code.  Anyway, you can still have a look at what I have
locally for my PCI sound drivers:

http://cubidou.nerim.net/pcilkm.tgz

It is possible to (quite easily i think) adapt the pcilkm module as a
usblkm module.

-- 
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.