blob: d873abe35bf665193a34d9cdf516b60ecb2f5e93 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -04002/*
3 * PCI Backend - Data structures for special overlays for broken devices.
4 *
5 * Ryan Wilson <hap9@epoch.ncsc.mil>
6 * Chris Bookholt <hap10@epoch.ncsc.mil>
7 */
8
9#ifndef __XEN_PCIBACK_CONF_SPACE_QUIRKS_H__
10#define __XEN_PCIBACK_CONF_SPACE_QUIRKS_H__
11
12#include <linux/pci.h>
13#include <linux/list.h>
14
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040015struct xen_pcibk_config_quirk {
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040016 struct list_head quirks_list;
17 struct pci_device_id devid;
18 struct pci_dev *pdev;
19};
20
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040021int xen_pcibk_config_quirks_add_field(struct pci_dev *dev, struct config_field
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040022 *field);
23
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040024int xen_pcibk_config_quirks_remove_field(struct pci_dev *dev, int reg);
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040025
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040026int xen_pcibk_config_quirks_init(struct pci_dev *dev);
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040027
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040028void xen_pcibk_config_field_free(struct config_field *field);
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040029
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040030int xen_pcibk_config_quirk_release(struct pci_dev *dev);
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040031
Konrad Rzeszutek Wilka92336a2011-07-19 19:40:51 -040032int xen_pcibk_field_is_dup(struct pci_dev *dev, unsigned int reg);
Konrad Rzeszutek Wilk30edc142009-10-13 17:22:20 -040033
34#endif