Received: from eggs.gnu.org ([208.118.235.92]:44577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDzyY-0004wn-PN for qemu-devel@nongnu.org; Sat, 31 Mar 2012 11:12:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDzyW-0001Ep-3Z for qemu-devel@nongnu.org; Sat, 31 Mar 2012 11:12:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDzyV-0001EQ-SB for qemu-devel@nongnu.org; Sat, 31 Mar 2012 11:12:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2VFCIb3005818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 31 Mar 2012 11:12:18 -0400 From: Hans de Goede Date: Sat, 31 Mar 2012 17:14:22 +0200 Message-Id: <1333206863-11425-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1333206863-11425-1-git-send-email-hdegoede@redhat.com> References: <1333206863-11425-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] usb-redir: Reset device address and speed on disconnect List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Without this disconnected devices look like the last redirected device in the monitor in "info usb". Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 9cea7c1..11d3b2b 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1134,6 +1134,8 @@ static void usbredir_device_disconnect(void *priv) } usb_ep_init(&dev->dev); dev->interface_info.interface_count = NO_INTERFACE_INFO; + dev->dev.addr = 0; + dev->dev.speed = 0; } static void usbredir_interface_info(void *priv, -- 1.7.9.3