From patchwork Mon Sep 2 10:17:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 271857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 46F3C2C009C for ; Mon, 2 Sep 2013 20:18:36 +1000 (EST) Received: from localhost ([::1]:38449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGRDO-0006Xh-D1 for incoming@patchwork.ozlabs.org; Mon, 02 Sep 2013 06:18:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGRCf-0006PP-BT for qemu-devel@nongnu.org; Mon, 02 Sep 2013 06:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGRCZ-0007PQ-QZ for qemu-devel@nongnu.org; Mon, 02 Sep 2013 06:17:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGRCZ-0007Ow-I2; Mon, 02 Sep 2013 06:17:43 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r82AHgdL015933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Sep 2013 06:17:43 -0400 Received: from nilsson.home.kraxel.org (vpn1-7-100.ams2.redhat.com [10.36.7.100]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r82AHfk3026894; Mon, 2 Sep 2013 06:17:42 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 2E3E5804A7; Mon, 2 Sep 2013 12:17:40 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 2 Sep 2013 12:17:34 +0200 Message-Id: <1378117055-29620-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1378117055-29620-1-git-send-email-kraxel@redhat.com> References: <1378117055-29620-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 10/11] Revert "usb-hub: report status changes only once" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. Now with the root cause being fixed in xhci (commit ) we can revert this one. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 54f63c0..58647b4 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -33,7 +33,6 @@ typedef struct USBHubPort { USBPort port; uint16_t wPortStatus; uint16_t wPortChange; - uint16_t wPortChange_reported; } USBHubPort; typedef struct USBHubState { @@ -468,11 +467,8 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p) status = 0; for(i = 0; i < NUM_PORTS; i++) { port = &s->ports[i]; - if (port->wPortChange && - port->wPortChange_reported != port->wPortChange) { + if (port->wPortChange) status |= (1 << (i + 1)); - } - port->wPortChange_reported = port->wPortChange; } if (status != 0) { trace_usb_hub_status_report(s->dev.addr, status);