Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82834
b: refs/heads/master
c: 55a7c06
h: refs/heads/master
v: v3
  • Loading branch information
Anthony Liguori authored and Rusty Russell committed Feb 4, 2008
1 parent 4da4ec3 commit 0623ff9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3343660d8c62c6b00b2f15324ef3fcb6be207bfa
refs/heads/master: 55a7c066041e7850948d29ed813f62821a9ec046
6 changes: 6 additions & 0 deletions trunk/drivers/virtio/virtio_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
if (pci_dev->device < 0x1000 || pci_dev->device > 0x103f)
return -ENODEV;

if (pci_dev->revision != VIRTIO_PCI_ABI_VERSION) {
printk(KERN_ERR "virtio_pci: expected ABI version %d, got %d\n",
VIRTIO_PCI_ABI_VERSION, pci_dev->revision);
return -ENODEV;
}

/* allocate our structure and fill it out */
vp_dev = kzalloc(sizeof(struct virtio_pci_device), GFP_KERNEL);
if (vp_dev == NULL)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/virtio_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@
* configuration space */
#define VIRTIO_PCI_CONFIG 20

/* Virtio ABI version, this must match exactly */
#define VIRTIO_PCI_ABI_VERSION 0
#endif

0 comments on commit 0623ff9

Please sign in to comment.