From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 6/7] usb hub: add migration support
Date: Fri, 14 Jan 2011 12:55:31 +0100 [thread overview]
Message-ID: <1295006132-29153-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1295006132-29153-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb-hub.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 78698ca..3dd31ba 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -544,11 +544,35 @@ static int usb_hub_initfn(USBDevice *dev)
return 0;
}
+static const VMStateDescription vmstate_usb_hub_port = {
+ .name = "usb-hub-port",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_UINT16(wPortStatus, USBHubPort),
+ VMSTATE_UINT16(wPortChange, USBHubPort),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_usb_hub = {
+ .name = "usb-hub",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_USB_DEVICE(dev, USBHubState),
+ VMSTATE_STRUCT_ARRAY(ports, USBHubState, NUM_PORTS, 0,
+ vmstate_usb_hub_port, USBHubPort),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static struct USBDeviceInfo hub_info = {
.product_desc = "QEMU USB Hub",
.qdev.name = "usb-hub",
.qdev.fw_name = "hub",
.qdev.size = sizeof(USBHubState),
+ .qdev.vmsd = &vmstate_usb_hub,
.usb_desc = &desc_hub,
.init = usb_hub_initfn,
.handle_packet = usb_hub_handle_packet,
--
1.7.1
next prev parent reply other threads:[~2011-01-14 11:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 11:55 [Qemu-devel] [PATCH 0/7] usb: add migration support Gerd Hoffmann
2011-01-14 11:55 ` [Qemu-devel] [PATCH 1/7] add event queueing to USB HID Gerd Hoffmann
2011-01-14 11:55 ` [Qemu-devel] [PATCH 2/7] usb keyboard: add event event queue Gerd Hoffmann
2011-01-14 16:30 ` [Qemu-devel] " Paolo Bonzini
2011-01-14 11:55 ` [Qemu-devel] [PATCH 3/7] usb hid: move head+n to common struct Gerd Hoffmann
2011-01-14 16:31 ` [Qemu-devel] " Paolo Bonzini
2011-01-14 11:55 ` [Qemu-devel] [PATCH 4/7] vnc: fix numlock+capslock tracking Gerd Hoffmann
2011-01-14 11:55 ` [Qemu-devel] [PATCH 5/7] usb core: add migration support Gerd Hoffmann
2011-01-14 11:55 ` Gerd Hoffmann [this message]
2011-01-14 11:55 ` [Qemu-devel] [PATCH 7/7] usb hid: " Gerd Hoffmann
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=1295006132-29153-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--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).