Blame 0361-usb-Migrate-over-device-speed-and-speedmask.patch

Hans de Goede c8dfc6
From 6ba840c192897029895930a504527d4350b88d26 Mon Sep 17 00:00:00 2001
Hans de Goede c8dfc6
From: Hans de Goede <hdegoede@redhat.com>
Hans de Goede c8dfc6
Date: Thu, 6 Sep 2012 15:34:19 +0200
Hans de Goede c8dfc6
Subject: [PATCH 361/366] usb: Migrate over device speed and speedmask
Hans de Goede c8dfc6
Hans de Goede c8dfc6
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede c8dfc6
---
Hans de Goede c8dfc6
 hw/usb.h     | 4 ++--
Hans de Goede c8dfc6
 hw/usb/bus.c | 2 ++
Hans de Goede c8dfc6
 2 files changed, 4 insertions(+), 2 deletions(-)
Hans de Goede c8dfc6
Hans de Goede c8dfc6
diff --git a/hw/usb.h b/hw/usb.h
Hans de Goede c8dfc6
index 48c8926..918af99 100644
Hans de Goede c8dfc6
--- a/hw/usb.h
Hans de Goede c8dfc6
+++ b/hw/usb.h
Hans de Goede c8dfc6
@@ -204,9 +204,9 @@ struct USBDevice {
Hans de Goede c8dfc6
     uint32_t flags;
Hans de Goede c8dfc6
 
Hans de Goede c8dfc6
     /* Actual connected speed */
Hans de Goede c8dfc6
-    int speed;
Hans de Goede c8dfc6
+    int32_t speed;
Hans de Goede c8dfc6
     /* Supported speeds, not in info because it may be variable (hostdevs) */
Hans de Goede c8dfc6
-    int speedmask;
Hans de Goede c8dfc6
+    int32_t speedmask;
Hans de Goede c8dfc6
     uint8_t addr;
Hans de Goede c8dfc6
     char product_desc[32];
Hans de Goede c8dfc6
     int auto_attach;
Hans de Goede c8dfc6
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
Hans de Goede c8dfc6
index b649360..223c1df 100644
Hans de Goede c8dfc6
--- a/hw/usb/bus.c
Hans de Goede c8dfc6
+++ b/hw/usb/bus.c
Hans de Goede c8dfc6
@@ -55,6 +55,8 @@ const VMStateDescription vmstate_usb_device = {
Hans de Goede c8dfc6
     .minimum_version_id = 1,
Hans de Goede c8dfc6
     .post_load = usb_device_post_load,
Hans de Goede c8dfc6
     .fields = (VMStateField []) {
Hans de Goede c8dfc6
+        VMSTATE_INT32(speed, USBDevice),
Hans de Goede c8dfc6
+        VMSTATE_INT32(speedmask, USBDevice),
Hans de Goede c8dfc6
         VMSTATE_UINT8(addr, USBDevice),
Hans de Goede c8dfc6
         VMSTATE_INT32(state, USBDevice),
Hans de Goede c8dfc6
         VMSTATE_INT32(remote_wakeup, USBDevice),
Hans de Goede c8dfc6
-- 
Hans de Goede c8dfc6
1.7.12
Hans de Goede c8dfc6