[lkml]   [2001]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [ANNOUNCE] Hardware detection tool 0.2
On Fri, Aug 31, 2001 at 07:46:38PM -0400, jeff millar wrote:
> What bus and slot number does the driver use to register itself before the
> plugging the card?

I don't understand what you are asking here.
In pci_module_init you pass a pointer to your struct pci_driver object
that describes to the pci subsystem what kind of pci devices that your
driver works for. It does this with the id_table pointer which is a
struct pci_device_id.

MODULE_DEVICE_TABLE takes that struct pci_device_id table and exports it
to an area in the module object table that allows it to be extracted by
depmod. depmod takes that info and creates
/lib/modules/<kernel_version/modules.pcimap from it. So any userspace
code can then look at the modules.pcimap file and determine what kind of
pci devices each module is claiming it supports.

Using that table, combined with tools like lspci, a userspace program
can build a table of kernel modules that a given hardware platform
needs. And if it wants to, from the kernel module list, it can generate
a .config file, which is what I think Carlos is trying to do. And what
I thought this thread was talking about.

This whole process did not involve any hotplug stuff at all.

But if you want to use it for hotplug you can :)
See my OLS 2001 paper and presentation at
and which contains lots of good
documentation if you want to know more on how the linux-hotplug
subsystem currently works.

Did that help?


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:01    [W:0.082 / U:40.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site