dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0012-Revert-usb-hub-report-status-changes-only-once.patch

298366
From c09a4634d945df5d7e1fbc394646e78d7d713c67 Mon Sep 17 00:00:00 2001
298366
From: Gerd Hoffmann <kraxel@redhat.com>
298366
Date: Tue, 27 Aug 2013 17:00:04 +0200
298366
Subject: [PATCH] Revert "usb-hub: report status changes only once"
298366
298366
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3.
298366
298366
This isn't in line with the usb specification and adds regressions,
298366
win7 fails to drive the usb hub for example.
298366
298366
Was added because it "solved" the issue of hubs interacting badly
298366
with the xhci host controller.  Now with the root cause being fixed
298366
in xhci (commit <FIXME>) we can revert this one.
298366
298366
Cc: qemu-stable@nongnu.org
298366
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
298366
(cherry picked from commit bdebd6ee81f4d849aa8541c289203e3992450db0)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 hw/usb/dev-hub.c | 6 +-----
298366
 1 file changed, 1 insertion(+), 5 deletions(-)
298366
298366
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
298366
index e865a98..4188a3c 100644
298366
--- a/hw/usb/dev-hub.c
298366
+++ b/hw/usb/dev-hub.c
298366
@@ -33,7 +33,6 @@ typedef struct USBHubPort {
298366
     USBPort port;
298366
     uint16_t wPortStatus;
298366
     uint16_t wPortChange;
298366
-    uint16_t wPortChange_reported;
298366
 } USBHubPort;
298366
 
298366
 typedef struct USBHubState {
298366
@@ -468,11 +467,8 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p)
298366
             status = 0;
298366
             for(i = 0; i < NUM_PORTS; i++) {
298366
                 port = &s->ports[i];
298366
-                if (port->wPortChange &&
298366
-                    port->wPortChange_reported != port->wPortChange) {
298366
+                if (port->wPortChange)
298366
                     status |= (1 << (i + 1));
298366
-                }
298366
-                port->wPortChange_reported = port->wPortChange;
298366
             }
298366
             if (status != 0) {
298366
                 for(i = 0; i < n; i++) {