aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pci.txt
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-04-07 11:21:28 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 22:02:35 -0400
commit6ba186361ed2cda7e174856a3ab8a8e3237b3c3d (patch)
tree97fe2b10ee8f11b914ea891a3872c4da4f542a6d /Documentation/pci.txt
parent40ee9e9f8d52d85f2446bbdda7823a3f1de62f3f (diff)
PCI: Require vendor and device for new_id
Currently, there is no minimum number of fields required when adding a new device ID to a PCI driver through the new_id sysfs file. It is possible to add a new ID with only the vendor ID set, causing the driver to attempt to attach to all PCI devices from that vendor. This has been reported to happen accidentally: http://lists.lm-sensors.org/pipermail/lm-sensors/2007-March/019366.html It is even possible to not even set the vendor ID field, causing the driver to attempt to attach to _all_ the PCI devices. This sounds dangerous and I fail to see any valid use of this "feature". Thus I suggest that we now require at least the first two fields (vendor ID and device ID) to be set. For what it's worth, this is what the USB subsystem does. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/pci.txt')
-rw-r--r--Documentation/pci.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/pci.txt b/Documentation/pci.txt
index cdf2f3c0ab14..a8ded1a8bd62 100644
--- a/Documentation/pci.txt
+++ b/Documentation/pci.txt
@@ -163,9 +163,9 @@ echo "vendor device subvendor subdevice class class_mask driver_data" > \
163/sys/bus/pci/drivers/{driver}/new_id 163/sys/bus/pci/drivers/{driver}/new_id
164 164
165All fields are passed in as hexadecimal values (no leading 0x). 165All fields are passed in as hexadecimal values (no leading 0x).
166Users need pass only as many fields as necessary: 166The vendor and device fields are mandatory, the others are optional. Users
167 o vendor, device, subvendor, and subdevice fields default 167need pass only as many optional fields as necessary:
168 to PCI_ANY_ID (FFFFFFFF), 168 o subvendor and subdevice fields default to PCI_ANY_ID (FFFFFFFF)
169 o class and classmask fields default to 0 169 o class and classmask fields default to 0
170 o driver_data defaults to 0UL. 170 o driver_data defaults to 0UL.
171 171