Re: Displaying/modifying PCI device id tables via sysfs

Greg KH (greg@kroah.com)
Mon, 3 Mar 2003 10:25:53 -0800


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. It's also available in raw form in the .o file if you want to
export it to any other format that you may want to use. Why export it
again through sysfs?

> 2) Add new IDs at runtime and have the drivers probe for the new IDs.

Ick, no. If a driver really wants to have a user provide new ids on the
fly, they usually provide a module paramater to do this. A number of
the USB drivers do this already (and to be honest, they have caused
nothing but trouble, as users use that option for new devices, that the
driver can't control at all due to protocol or register location
changes.)

In short, it's not a good idea to allow users to change these values on
the fly, the driver author usually knows best here :)

thanks,

greg k-h
-
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/