From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAsxM-0003JQ-C9 for qemu-devel@nongnu.org; Thu, 11 Dec 2008 16:20:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAsxL-0003Ht-G0 for qemu-devel@nongnu.org; Thu, 11 Dec 2008 16:20:23 -0500 Received: from [199.232.76.173] (port=56698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAsxL-0003HW-6h for qemu-devel@nongnu.org; Thu, 11 Dec 2008 16:20:23 -0500 Received: from savannah.gnu.org ([199.232.41.3]:36028 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAsxK-00017h-JF for qemu-devel@nongnu.org; Thu, 11 Dec 2008 16:20:22 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LAsxE-0000rJ-2p for qemu-devel@nongnu.org; Thu, 11 Dec 2008 21:20:17 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LAsx7-0000qw-FX for qemu-devel@nongnu.org; Thu, 11 Dec 2008 21:20:11 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Thu, 11 Dec 2008 21:20:09 +0000 Subject: [Qemu-devel] [5987] pci: virtio: use pci id defines (Gerd Hoffman) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5987 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5987 Author: aliguori Date: 2008-12-11 21:20:03 +0000 (Thu, 11 Dec 2008) Log Message: ----------- pci: virtio: use pci id defines (Gerd Hoffman) Use the defines added by the previous patch in the virtio drivers. Also remove the pointless vendor and device args from the virtio_blk_init() function. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/pc.c trunk/hw/virtio-balloon.c trunk/hw/virtio-blk.c trunk/hw/virtio-blk.h Modified: trunk/hw/pc.c =================================================================== --- trunk/hw/pc.c 2008-12-11 21:15:42 UTC (rev 5986) +++ trunk/hw/pc.c 2008-12-11 21:20:03 UTC (rev 5987) @@ -1101,8 +1101,7 @@ int unit_id = 0; while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { - virtio_blk_init(pci_bus, 0x1AF4, 0x1001, - drives_table[index].bdrv); + virtio_blk_init(pci_bus, drives_table[index].bdrv); unit_id++; } } Modified: trunk/hw/virtio-balloon.c =================================================================== --- trunk/hw/virtio-balloon.c 2008-12-11 21:15:42 UTC (rev 5986) +++ trunk/hw/virtio-balloon.c 2008-12-11 21:20:03 UTC (rev 5987) @@ -172,7 +172,8 @@ VirtIOBalloon *s; s = (VirtIOBalloon *)virtio_init_pci(bus, "virtio-balloon", - 6900, 0x1002, + PCI_VENDOR_ID_REDHAT_QUMRANET, + PCI_DEVICE_ID_VIRTIO_BALLOON, 0, VIRTIO_ID_BALLOON, 0x05, 0x00, 0x00, 8, sizeof(VirtIOBalloon)); Modified: trunk/hw/virtio-blk.c =================================================================== --- trunk/hw/virtio-blk.c 2008-12-11 21:15:42 UTC (rev 5986) +++ trunk/hw/virtio-blk.c 2008-12-11 21:20:03 UTC (rev 5987) @@ -218,14 +218,15 @@ return 0; } -void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, - BlockDriverState *bs) +void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs) { VirtIOBlock *s; int cylinders, heads, secs; static int virtio_blk_id; - s = (VirtIOBlock *)virtio_init_pci(bus, "virtio-blk", vendor, device, + s = (VirtIOBlock *)virtio_init_pci(bus, "virtio-blk", + PCI_VENDOR_ID_REDHAT_QUMRANET, + PCI_DEVICE_ID_VIRTIO_BLOCK, 0, VIRTIO_ID_BLOCK, 0x01, 0x80, 0x00, sizeof(struct virtio_blk_config), sizeof(VirtIOBlock)); Modified: trunk/hw/virtio-blk.h =================================================================== --- trunk/hw/virtio-blk.h 2008-12-11 21:15:42 UTC (rev 5986) +++ trunk/hw/virtio-blk.h 2008-12-11 21:20:03 UTC (rev 5987) @@ -70,7 +70,6 @@ unsigned char status; }; -void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, - BlockDriverState *bs); +void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs); #endif