virtio: remove explicit IDs from virtio_pci.c

Qumranet let us use their PCI vendor ID, with device ids >= 0x1000.
We can specify that we accept all of them in the device ID table, and
then return -ENODEV in the probe routine.

modprobe will load all the modules which match a given alias so we
might be loaded when we're not needed, but that's the worst that can
happen.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 drivers/virtio/virtio_pci.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff -r 0d957073b1aa drivers/virtio/virtio_pci.c
--- a/drivers/virtio/virtio_pci.c	Mon Jan 21 22:04:57 2008 +1100
+++ b/drivers/virtio/virtio_pci.c	Mon Jan 21 22:22:04 2008 +1100
@@ -62,10 +62,9 @@ struct virtio_pci_vq_info
 	struct list_head node;
 };
 
-/* We have to enumerate here all virtio PCI devices. */
+/* Qumranet donated their vendor ID for devices 0x1000 thru 0x10FF. */
 static struct pci_device_id virtio_pci_id_table[] = {
-	{ 0x1af4, 0x1000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* virtio net */
-	{ 0x1af4, 0x1001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* virtio blk */
+	{ 0x1af4, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0 },
 };
 
@@ -303,6 +302,10 @@ static int __devinit virtio_pci_probe(st
 	struct virtio_pci_device *vp_dev;
 	int err;
 
+	/* We only own devices >= 0x1000 and <= 0x103f: leave the rest. */
+	if (pci_dev->device < 0x1000 || pci_dev->device > 0x103f)
+		return -ENODEV;
+
 	/* allocate our structure and fill it out */
 	vp_dev = kzalloc(sizeof(struct virtio_pci_device), GFP_KERNEL);
 	if (vp_dev == NULL)
