From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAoid-000410-Ta for qemu-devel@nongnu.org; Thu, 11 Dec 2008 11:48:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAoic-0003ye-28 for qemu-devel@nongnu.org; Thu, 11 Dec 2008 11:48:55 -0500 Received: from [199.232.76.173] (port=56529 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAoib-0003yL-TK for qemu-devel@nongnu.org; Thu, 11 Dec 2008 11:48:53 -0500 Received: from mx2.redhat.com ([66.187.237.31]:36815) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAoia-0005Ri-Az for qemu-devel@nongnu.org; Thu, 11 Dec 2008 11:48:52 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBBGmnlM015521 for ; Thu, 11 Dec 2008 11:48:49 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBBGmm3x004380 for ; Thu, 11 Dec 2008 11:48:49 -0500 Received: from zweiblum.travel.kraxel.org (vpn-10-62.str.redhat.com [10.32.10.62]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mBBGmifi020734 for ; Thu, 11 Dec 2008 11:48:46 -0500 Message-ID: <4941446B.7030606@redhat.com> Date: Thu, 11 Dec 2008 17:48:43 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040601090006040803060701" Subject: [Qemu-devel] [PATCH] pci: virtio: use pci id defines. 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 This is a multi-part message in MIME format. --------------040601090006040803060701 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, 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. please apply, Gerd --------------040601090006040803060701 Content-Type: text/plain; name="0022-pci-virtio-use-pci-id-defines.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0022-pci-virtio-use-pci-id-defines.patch" >>From 47472ad689b422de944b761c9397ada7d80763f2 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 11 Dec 2008 15:29:48 +0100 Subject: [PATCH] pci: virtio: use pci id defines. 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 --- hw/pc.c | 3 +-- hw/virtio-balloon.c | 3 ++- hw/virtio-blk.c | 7 ++++--- hw/virtio-blk.h | 3 +-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 20827f2..73dd8bc 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1101,8 +1101,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, 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++; } } diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index e668436..0765516 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -172,7 +172,8 @@ void *virtio_balloon_init(PCIBus *bus) 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)); diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 91b90d2..e654cc5 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -218,14 +218,15 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) 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)); diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h index c6661c0..8c91e1e 100644 --- a/hw/virtio-blk.h +++ b/hw/virtio-blk.h @@ -70,7 +70,6 @@ struct virtio_blk_inhdr 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 -- 1.5.6.5 --------------040601090006040803060701--