This source file includes following definitions.
- pci_pf_stub_probe
- pci_pf_stub_init
- pci_pf_stub_exit
1
2
3
4
5
6
7
8
9 #include <linux/module.h>
10 #include <linux/pci.h>
11
12
13
14
15
16
17
18
19
20 static const struct pci_device_id pci_pf_stub_whitelist[] = {
21 { PCI_VDEVICE(AMAZON, 0x0053) },
22
23 { 0 }
24 };
25 MODULE_DEVICE_TABLE(pci, pci_pf_stub_whitelist);
26
27 static int pci_pf_stub_probe(struct pci_dev *dev,
28 const struct pci_device_id *id)
29 {
30 pci_info(dev, "claimed by pci-pf-stub\n");
31 return 0;
32 }
33
34 static struct pci_driver pf_stub_driver = {
35 .name = "pci-pf-stub",
36 .id_table = pci_pf_stub_whitelist,
37 .probe = pci_pf_stub_probe,
38 .sriov_configure = pci_sriov_configure_simple,
39 };
40
41 static int __init pci_pf_stub_init(void)
42 {
43 return pci_register_driver(&pf_stub_driver);
44 }
45
46 static void __exit pci_pf_stub_exit(void)
47 {
48 pci_unregister_driver(&pf_stub_driver);
49 }
50
51 module_init(pci_pf_stub_init);
52 module_exit(pci_pf_stub_exit);
53
54 MODULE_LICENSE("GPL");