Greg KH wrote:
Fill in the pci_dev->pretty_name field, in the proper format (look in drivers/pci/names.c::pci_name_device() for how to do this) and it will work.
pci_dev->pretty_name[] exists only in 2.6, and I was talking about 2.4, which is why I couldn't find it.
pci_name_device() initializes pci_dev->pretty_name[], overwriting whatever was already there. This function is called by pci_scan_device(), which I think is called when the PCI bus is probed at kernel boot.
So are you saying that my driver is supposed to override the value that pci_name_device() creates? Is that reliable? I'm not familiar with the PCI hotplug code, but isn't it possible that this function can be called whenever there's a PCI hotplug event? If so, how can I ensure that my driver updates this field after pci_name_device() is called? If I don't re-update it, it's going to revert to the non-pretty name.
But that's a hack, just update the pci.ids file :)
The pci.ids file is updated with our info already. I'm trying to support existing distros that were using an older version of the file.
Also, 5 minutes looking at how the name is created in the pci code would have told you how to do this...
I guess I shouldn't have stopped looking after 4.5 minutes.
-- Timur Tabi Staff Software Engineer timur.tabi@xxxxxxxxxxx
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/