xref: /linux/include/linux/device-id/cdx.h (revision d2c9a99135da931377240942d44f3dea104cedb8)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LINUX_DEVICE_ID_CDX_H
3 #define LINUX_DEVICE_ID_CDX_H
4 
5 #ifdef __KERNEL__
6 #include <linux/types.h>
7 #endif
8 
9 #define CDX_ANY_ID (0xFFFF)
10 
11 enum {
12 	CDX_ID_F_VFIO_DRIVER_OVERRIDE = 1,
13 };
14 
15 /**
16  * struct cdx_device_id - CDX device identifier
17  * @vendor: Vendor ID
18  * @device: Device ID
19  * @subvendor: Subsystem vendor ID (or CDX_ANY_ID)
20  * @subdevice: Subsystem device ID (or CDX_ANY_ID)
21  * @class: Device class
22  *         Most drivers do not need to specify class/class_mask
23  *         as vendor/device is normally sufficient.
24  * @class_mask: Limit which sub-fields of the class field are compared.
25  * @override_only: Match only when dev->driver_override is this driver.
26  *
27  * Type of entries in the "device Id" table for CDX devices supported by
28  * a CDX device driver.
29  */
30 struct cdx_device_id {
31 	__u16 vendor;
32 	__u16 device;
33 	__u16 subvendor;
34 	__u16 subdevice;
35 	__u32 class;
36 	__u32 class_mask;
37 	__u32 override_only;
38 };
39 
40 #endif /* ifndef LINUX_DEVICE_ID_CDX_H */
41