[lkml]   [2001]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectpci: dev->driver "runtime" acquisition?

supposing i've got a "hotplug" style pci_driver,
but who's going to gain access to a device _not_ at initialization time,
i.e. not within pci_register_driver(), but rather somehere in a bottom
half. no pci_device_id* at pci_register_driver( ), since i don't
know the signature yet.

how do i request access here?
could anyone comment on the following please:

1. simple, but intrusive somehow:
if ( dev->driver == NULL )
dev->driver = my_driver;
is the locking correct?

2. rather use pci_announce_device()?
my_driver->id_table =
pci_announce_device( my_driver, dev );
/* probe() does the rest */

3. patch drivers/pci/pci.c?
pci_acquire_device( struct pci *dev, struct pci_driver *drv )
/* fill in 1. */

4. simply rely on the "compat", i.e. just taking over some resource?
i think that's not why it's been called "compat"

any better ideas? something i'm missing?
besides: policy? -- do i _have_ to pci_register_driver() at during
initialization before considering to actually drive something?

any help appreciated.



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:18    [W:0.064 / U:8.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site