From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5987] pci: virtio: use pci id defines (Gerd Hoffman)
Date: Thu, 11 Dec 2008 21:20:09 +0000 [thread overview]
Message-ID: <E1LAsx7-0000qw-FX@cvs.savannah.gnu.org> (raw)
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 <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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
reply other threads:[~2008-12-11 21:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1LAsx7-0000qw-FX@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).