Alan Cox wrote:
> > AFAIK Keith will be yanking the PCI probe table from modules at depmod
> > time, and writing that info to a file, for installers and PCMCIA
> > packages to pick up. Seems sane to me...
> Sounds good to me too. He is aware that he needs to go into vendor subid
> data to get it correct (eg the lanmedia driver is a tulip but wired to wan
Since the kernel exports struct pci_device_id, the proposal from Keith I
saw simply exports the entire structure: vendor ids, subvendor ids,
class masks, ...
-- Jeff Garzik | Nothing cures insomnia like the Building 1024 | realization that it's time to get up. MandrakeSoft, Inc. | -- random fortune
attached mail follows:
On Wed, 12 Apr 2000 23:29:33 -0400, Jeff Garzik <firstname.lastname@example.org> wrote: >> Keith Owens wrote: >> > probe eth0 3c575_cb 3c59x >Yes but did we solve the problem at all? :) > >David's PCMCIA package must *still* be manually updated for each and >every new CardBus driver added to the kernel, and must be updated for >each and every driver that is renamed.
The probe command was just to solve the specific problem that Andrew was looking for. I agree that we need to extract the data from MODULE_DEVICE_TABLE and save it. I am working on depmod right now, to create /lib/modules/`uname -r`/modules_device_table. Format will be one line per device table entry
module_name type vendor device subvendor subdevice class class_mask
All values in hex and preceded by '0x', no leading zeroes. Let me know if that is acceptable.
One thing that worries me is that struct pci_device_id has no self defining data. If the size of pci_device_id changes then depmod will be out of sync with the kernel. Even recompiling modutils against the new kernel will not be satisfactory because then the user has to use different versions of depmod depending on which kernel they boot. Either we guarantee that table sizes will *NEVER* change or we need a sizeof(struct pci_device_id) in the module itself. How about this
#define MODULE_DEVICE_TABLE(type,name) \ static const int type##_device_id_size __attribute__((section(".modinfo"))) = \ sizeof(struct type##_device_id); \ const struct type##_device_id * __module_##type##_device_table = name;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:09 EST