Re: Displaying/modifying PCI device id tables via sysfs

Rusty Russell (rusty@rustcorp.com.au)
Fri, 23 May 2003 10:53:51 +1000


On Mon, 3 Mar 2003 10:25:53 -0800
Greg KH <greg@kroah.com> wrote:

> On Mon, Mar 03, 2003 at 11:57:05AM -0600, Matt Domsch wrote:
> > A lot of PCI drivers today use the pci_device_id table model to specify
> > what IDs the driver supports. I'd like to be able to do 2 things with
> > this information:
> > 1) display it in sysfs
>
> That info is already exported to userspace through the modules.pcimap
> file.

Matt's patch just went into Linus' tree, so I'll comment on this.

More importantly, the modules now contain suitable aliases embedded within
them: modules.pcimap et al will vanish before 2.6 whenever Greg (hint hint)
updates the hotplug scripts to use them instead of modules.XXXmap.

So the question is, how do you add PCI IDs to a module which isn't loaded?
You can trivially add a new alias for it, which will cause modprobe to
find it, but the module won't know it can handle the new PCI ID, and
will fail to load.

Obvious options include:
just update the damn module
inserting the new PCI entry in the module (simple, but icky)
adding a module param to say "add these IDs"

I agree with Alan (and Jeff Garzik who pointed this out to me before)
that it's neat to be able to update these tables on the fly, but that
is probably even more important for modules which aren't loaded.

Matt, do you have thoughts on this?

Cheers,
Rusty.

-- 
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/