Subject: LKM and pci device lookup (SbLive driver example)
To: None <tech-kern@netbsd.org>
From: yannick montulet <yannick.montulet@epitech.net>
List: tech-kern
Date: 05/08/2001 15:31:58
Hi,

I saw recently in the news that many people were speaking
about looking for a pci device after boot.

As i am doing an SbLive driver as an LKM, I encountered the very same
problem.

So i thought giving out my code could show a practical example of
this.

Aside from having problems to look for a pci device after boot, 
a more general problems in attaching an LKM device driver is that device
drivers are accessible through a static table (cfdata), so there is no
easy way to properly behave as an in-kernel device driver.
Wouldn't a linked list instead of a static table solve the problem ?.

Important files are :
- include/device_lkm.h, subr_autoconf_lkm.c
- include/pci_lkm.h, pci_probe_lkm.c
- sblive_lkm{load,unload}.c


Hope it helps,

Yannick MONTULET