diff options
author | Max Gurtovoy <mgurtovoy@nvidia.com> | 2021-08-26 13:39:08 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-08-26 10:36:51 -0600 |
commit | 343b7258687ecfbb363bfda8833a7cf641aac524 (patch) | |
tree | 434e78584525876789777812c37e572de60dd563 /include/linux/mod_devicetable.h | |
parent | c61302aa48f7c46b5c9d893109488af951be12e4 (diff) | |
download | linux-stable-343b7258687ecfbb363bfda8833a7cf641aac524.tar.gz linux-stable-343b7258687ecfbb363bfda8833a7cf641aac524.tar.bz2 linux-stable-343b7258687ecfbb363bfda8833a7cf641aac524.zip |
PCI: Add 'override_only' field to struct pci_device_id
Add 'override_only' field to struct pci_device_id to be used as part of
pci_match_device().
When set, a driver only matches the entry when dev->driver_override is
set to that driver.
In addition, add a helper macro named 'PCI_DEVICE_DRIVER_OVERRIDE' to
enable setting some data on it.
Next patch from this series will use the above functionality.
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20210826103912.128972-10-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/mod_devicetable.h')
-rw-r--r-- | include/linux/mod_devicetable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 8e291cfdaf06..2e3ba6d9ece0 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -34,12 +34,14 @@ typedef unsigned long kernel_ulong_t; * Best practice is to use driver_data as an index * into a static list of equivalent device types, * instead of using it as a pointer. + * @override_only: Match only when dev->driver_override is this driver. */ struct pci_device_id { __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ kernel_ulong_t driver_data; /* Data private to the driver */ + __u32 override_only; }; |