From patchwork Wed Nov 23 17:25:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 127354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B8D371007D4 for ; Thu, 24 Nov 2011 04:25:34 +1100 (EST) Received: from localhost ([::1]:56673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTGZe-00030H-U4 for incoming@patchwork.ozlabs.org; Wed, 23 Nov 2011 12:25:30 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTGZY-00030A-0v for qemu-devel@nongnu.org; Wed, 23 Nov 2011 12:25:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTGZW-0008Kh-Ub for qemu-devel@nongnu.org; Wed, 23 Nov 2011 12:25:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTGZW-0008KL-NN for qemu-devel@nongnu.org; Wed, 23 Nov 2011 12:25:22 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pANHPKu7029093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Nov 2011 12:25:20 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pANHPJOh008366; Wed, 23 Nov 2011 12:25:19 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 7B4C740881; Wed, 23 Nov 2011 18:25:18 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 23 Nov 2011 18:25:13 +0100 Message-Id: <1322069117-27150-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1322069117-27150-1-git-send-email-kraxel@redhat.com> References: <1322069117-27150-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 3/7] usb-hub: wakeup on detach too. 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 When detaching devices from the usb hub we must wakeup too, otherwise the host misses the detach event. Commit 4a33a9ea06f6fbb08d8311a7cfed72975344f9ab does the same for device attach. Found by hkran@linux.vnet.ibm.com Signed-off-by: Gerd Hoffmann --- hw/usb-hub.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 3eb0f1a..5b48763 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -171,6 +171,8 @@ static void usb_hub_detach(USBPort *port1) USBHubState *s = port1->opaque; USBHubPort *port = &s->ports[port1->index]; + usb_wakeup(&s->dev); + /* Let upstream know the device on this port is gone */ s->dev.port->ops->child_detach(s->dev.port, port1->dev);