diff options
Diffstat (limited to 'drivers/virtio/virtio_pci_common.h')
-rw-r--r-- | drivers/virtio/virtio_pci_common.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h index 2b1e70db44a0..610c43f19230 100644 --- a/drivers/virtio/virtio_pci_common.h +++ b/drivers/virtio/virtio_pci_common.h | |||
@@ -53,12 +53,29 @@ struct virtio_pci_device { | |||
53 | struct virtio_device vdev; | 53 | struct virtio_device vdev; |
54 | struct pci_dev *pci_dev; | 54 | struct pci_dev *pci_dev; |
55 | 55 | ||
56 | /* In legacy mode, these two point to within ->legacy. */ | ||
57 | /* Where to read and clear interrupt */ | ||
58 | u8 __iomem *isr; | ||
59 | |||
60 | /* Modern only fields */ | ||
61 | /* The IO mapping for the PCI config space (non-legacy mode) */ | ||
62 | struct virtio_pci_common_cfg __iomem *common; | ||
63 | /* Device-specific data (non-legacy mode) */ | ||
64 | void __iomem *device; | ||
65 | |||
66 | /* So we can sanity-check accesses. */ | ||
67 | size_t device_len; | ||
68 | |||
69 | /* Capability for when we need to map notifications per-vq. */ | ||
70 | int notify_map_cap; | ||
71 | |||
72 | /* Multiply queue_notify_off by this value. (non-legacy mode). */ | ||
73 | u32 notify_offset_multiplier; | ||
74 | |||
75 | /* Legacy only field */ | ||
56 | /* the IO mapping for the PCI config space */ | 76 | /* the IO mapping for the PCI config space */ |
57 | void __iomem *ioaddr; | 77 | void __iomem *ioaddr; |
58 | 78 | ||
59 | /* the IO mapping for ISR operation */ | ||
60 | void __iomem *isr; | ||
61 | |||
62 | /* a list of queues so we can dispatch IRQs */ | 79 | /* a list of queues so we can dispatch IRQs */ |
63 | spinlock_t lock; | 80 | spinlock_t lock; |
64 | struct list_head virtqueues; | 81 | struct list_head virtqueues; |
@@ -129,5 +146,7 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu); | |||
129 | 146 | ||
130 | int virtio_pci_legacy_probe(struct virtio_pci_device *); | 147 | int virtio_pci_legacy_probe(struct virtio_pci_device *); |
131 | void virtio_pci_legacy_remove(struct virtio_pci_device *); | 148 | void virtio_pci_legacy_remove(struct virtio_pci_device *); |
149 | int virtio_pci_modern_probe(struct virtio_pci_device *); | ||
150 | void virtio_pci_modern_remove(struct virtio_pci_device *); | ||
132 | 151 | ||
133 | #endif | 152 | #endif |