Skip to contentSkip to conversation

pci.txt: clarify vendor ID policy

PATCH Applied Michael S. Tsirkin 2 participants 2 messages Mar 30, 2015 – Apr 9, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci.txt: clarify vendor ID policy

Top of include/linux/pci_ids.h says:
Do not add new entries to this file unless the definitions are shared between multiple drivers.
on the other hand, Documentation/PCI/pci.txt seems to imply that all vendor IDs should be added in include/linux/pci_ids.h.

Clarify text pci.txt to avoid the apparent contradiction.

---
 Documentation/PCI/pci.txt | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
Documentation/PCI/pci.txt +8 -5
index 53da450..47b0e28 100644
@@ -564,12 +564,15 @@ to be handled by platform and generic code, not individual drivers.
 8. Vendor and device identifications
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-One is not required to add new device ids to include/linux/pci_ids.h.
-Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids.
+One is not required to add new device or vendor ids to include/linux/pci_ids.h.
+Please define PCI_VENDOR_ID_xxx for vendor ids and use a hex constant for
+device ids in your driver.
 
-PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary
-hex numbers (vendor controlled) and normally used only in a single
-location, the pci_device_id table.
+Only PCI_VENDOR_ID_xxx constant definitions that are re-used between multiple
+drivers should be added to include/linux/pci_ids.h.
+
+The device ids are arbitrary hex numbers (vendor controlled) and normally used
+only in a single location, the pci_device_id table.
 
 Please DO submit new vendor/device ids to pciids.sourceforge.net project.
 
Signature · 1 line
MST
maintainer Applied
#1 lore raw
Quoted 9 lines · Michael S. Tsirkin

Top of include/linux/pci_ids.h says:
Do not add new entries to this file unless the definitions are shared between multiple drivers.
on the other hand, Documentation/PCI/pci.txt seems to imply that all vendor IDs should be added in include/linux/pci_ids.h.

Clarify text pci.txt to avoid the apparent contradiction.

Applied to pci/misc for v4.1 in the following form. Thanks!

commit b3d3d4d67569ad726530d8de3d7aa334c7e7465b

Author: Michael S. Tsirkin <[email protected]>
Date:   Mon Mar 30 10:32:34 2015 +0200

PCI: Clarify policy for vendor IDs in pci.txt

Clarify pci.txt so it matches the "do not add new entries unless they are sahred between multiple drivers" comment in include/linux/pci_ids.h.

[bhelgaas: changelog, strengthen language]
Documentation/PCI/pci.txt +6 -6
index 9518006f6675..123881f62219 100644
@@ -564,14 +564,14 @@ to be handled by platform and generic code, not individual drivers.
 8. Vendor and device identifications
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-One is not required to add new device ids to include/linux/pci_ids.h.
-Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids.
+Do not add new device or vendor IDs to include/linux/pci_ids.h unless they
+are shared across multiple drivers.  You can add private definitions in
+your driver if they're helpful, or just use plain hex constants.
 
-PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary
-hex numbers (vendor controlled) and normally used only in a single
-location, the pci_device_id table.
+The device IDs are arbitrary hex numbers (vendor controlled) and normally used
+only in a single location, the pci_device_id table.
 
-Please DO submit new vendor/device ids to pciids.sourceforge.net project.
+Please DO submit new vendor/device IDs to http://pciids.sourceforge.net/.