From: Pantelis Koukousoulas Subject: [PATCH] Assign the correct pci id range to virtio_pci Date: Fri, 24 Apr 2009 14:17:40 +0300 Message-ID: <1240571860-13832-1-git-send-email-pktoss@gmail.com> Cc: Pantelis Koukousoulas To: kvm@vger.kernel.org Return-path: Received: from mail-fx0-f158.google.com ([209.85.220.158]:52749 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbZDXLRn (ORCPT ); Fri, 24 Apr 2009 07:17:43 -0400 Received: by fxm2 with SMTP id 2so1039378fxm.37 for ; Fri, 24 Apr 2009 04:17:42 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: According to the file pci-ids.txt in qemu sources, the range of PCI device IDs assigned to virtio_pci is 0x1000 to 0x10ff, with a few subranges that have different rules regarding who can get an ID there and how. Nevertheless, the full range should be assigned to the generic virtio_pci driver, so that all corresponding devices, including the experimental/unreleased ones "just work". --- drivers/virtio/virtio_pci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 330aacb..db3f3b5 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -325,8 +325,8 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, 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) + /* We only own devices >= 0x1000 and <= 0x10ff: leave the rest. */ + if (pci_dev->device < 0x1000 || pci_dev->device > 0x10ff) return -ENODEV; if (pci_dev->revision != VIRTIO_PCI_ABI_VERSION) { -- 1.5.6.3