yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-Revert-usb-hub-report-status-changes-only-once.patch

218e99
From 0808f68d525eca6d44f2f4660c34d953a36ae486 Mon Sep 17 00:00:00 2001
218e99
From: Gerd Hoffmann <kraxel@redhat.com>
218e99
Date: Thu, 12 Sep 2013 09:39:32 +0200
218e99
Subject: [PATCH 04/25] Revert "usb-hub: report status changes only once"
218e99
218e99
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
218e99
Message-id: <1378978772-21612-5-git-send-email-kraxel@redhat.com>
218e99
Patchwork-id: 54340
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 4/4] Revert "usb-hub: report status changes only once"
218e99
Bugzilla: 1001604
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3.
218e99
218e99
This isn't in line with the usb specification and adds regressions,
218e99
win7 fails to drive the usb hub for example.
218e99
218e99
Was added because it "solved" the issue of hubs interacting badly
218e99
with the xhci host controller.  Now with the root cause being fixed
218e99
in xhci (commit <FIXME>) we can revert this one.
218e99
218e99
[ rhel7 note: Damn, forgot to fill in the final commit hash before
218e99
              sending out the upstream pull request.  It's commit
218e99
              4d7a81c06f5f17e019a2d3a18300500bd64f6f40 ]
218e99
218e99
Cc: qemu-stable@nongnu.org
218e99
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
218e99
(cherry picked from commit bdebd6ee81f4d849aa8541c289203e3992450db0)
218e99
---
218e99
 hw/usb/dev-hub.c | 6 +-----
218e99
 1 file changed, 1 insertion(+), 5 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 hw/usb/dev-hub.c |    6 +-----
218e99
 1 files changed, 1 insertions(+), 5 deletions(-)
218e99
218e99
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
218e99
index 0b71abd..a5f092b 100644
218e99
--- a/hw/usb/dev-hub.c
218e99
+++ b/hw/usb/dev-hub.c
218e99
@@ -33,7 +33,6 @@ typedef struct USBHubPort {
218e99
     USBPort port;
218e99
     uint16_t wPortStatus;
218e99
     uint16_t wPortChange;
218e99
-    uint16_t wPortChange_reported;
218e99
 } USBHubPort;
218e99
 
218e99
 typedef struct USBHubState {
218e99
@@ -468,11 +467,8 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p)
218e99
             status = 0;
218e99
             for(i = 0; i < NUM_PORTS; i++) {
218e99
                 port = &s->ports[i];
218e99
-                if (port->wPortChange &&
218e99
-                    port->wPortChange_reported != port->wPortChange) {
218e99
+                if (port->wPortChange)
218e99
                     status |= (1 << (i + 1));
218e99
-                }
218e99
-                port->wPortChange_reported = port->wPortChange;
218e99
             }
218e99
             if (status != 0) {
218e99
                 for(i = 0; i < n; i++) {
218e99
-- 
218e99
1.7.1
218e99