aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/virtio/virtio_pci.c6
-rw-r--r--include/linux/virtio_pci.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 192687e3a56a..26f787ddd5ff 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -311,6 +311,12 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
311 if (pci_dev->device < 0x1000 || pci_dev->device > 0x103f) 311 if (pci_dev->device < 0x1000 || pci_dev->device > 0x103f)
312 return -ENODEV; 312 return -ENODEV;
313 313
314 if (pci_dev->revision != VIRTIO_PCI_ABI_VERSION) {
315 printk(KERN_ERR "virtio_pci: expected ABI version %d, got %d\n",
316 VIRTIO_PCI_ABI_VERSION, pci_dev->revision);
317 return -ENODEV;
318 }
319
314 /* allocate our structure and fill it out */ 320 /* allocate our structure and fill it out */
315 vp_dev = kzalloc(sizeof(struct virtio_pci_device), GFP_KERNEL); 321 vp_dev = kzalloc(sizeof(struct virtio_pci_device), GFP_KERNEL);
316 if (vp_dev == NULL) 322 if (vp_dev == NULL)
diff --git a/include/linux/virtio_pci.h b/include/linux/virtio_pci.h
index 860eb37bfa07..b3151659cf49 100644
--- a/include/linux/virtio_pci.h
+++ b/include/linux/virtio_pci.h
@@ -52,4 +52,6 @@
52 * configuration space */ 52 * configuration space */
53#define VIRTIO_PCI_CONFIG 20 53#define VIRTIO_PCI_CONFIG 20
54 54
55/* Virtio ABI version, this must match exactly */
56#define VIRTIO_PCI_ABI_VERSION 0
55#endif 57#endif