1 // SPDX-License-Identifier: GPL-2.0+
3 * Pvpanic PCI Device Support
5 * Copyright (C) 2021 Oracle.
8 #include <linux/errno.h>
9 #include <linux/module.h>
10 #include <linux/pci.h>
11 #include <linux/types.h>
15 #define PCI_DEVICE_ID_REDHAT_PVPANIC 0x0011
17 MODULE_AUTHOR("Mihai Carabas <mihai.carabas@oracle.com>");
18 MODULE_DESCRIPTION("pvpanic device driver");
19 MODULE_LICENSE("GPL");
21 static int pvpanic_pci_probe(struct pci_dev
*pdev
, const struct pci_device_id
*ent
)
26 ret
= pcim_enable_device(pdev
);
30 base
= pcim_iomap(pdev
, 0, 0);
34 return devm_pvpanic_probe(&pdev
->dev
, base
);
37 static const struct pci_device_id pvpanic_pci_id_tbl
[] = {
38 { PCI_DEVICE(PCI_VENDOR_ID_REDHAT
, PCI_DEVICE_ID_REDHAT_PVPANIC
)},
41 MODULE_DEVICE_TABLE(pci
, pvpanic_pci_id_tbl
);
43 static struct pci_driver pvpanic_pci_driver
= {
44 .name
= "pvpanic-pci",
45 .id_table
= pvpanic_pci_id_tbl
,
46 .probe
= pvpanic_pci_probe
,
47 .dev_groups
= pvpanic_dev_groups
,
49 module_pci_driver(pvpanic_pci_driver
);