From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7dML-0005pl-SX for qemu-devel@nongnu.org; Wed, 24 Jun 2015 01:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7dMI-0006y7-LN for qemu-devel@nongnu.org; Wed, 24 Jun 2015 01:36:29 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:39565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7dMI-0006xy-E8 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 01:36:26 -0400 Message-ID: <558A41A0.9060702@suse.com> Date: Wed, 24 Jun 2015 13:35:28 +0800 From: Lin Ma MIME-Version: 1.0 References: <1435117141-10459-1-git-send-email-lma@suse.com> <558A29A9.8030101@huawei.com> In-Reply-To: <558A29A9.8030101@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails Reply-To: lma@suse.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gonglei , "qemu-devel@nongnu.org Developers" 在 2015年06月24日 11:53, Gonglei 写道: > On 2015/6/24 11:39, Lin Ma wrote: >> Changes in V1: >> For avoiding regression issue, Dont remove the usb device from global hostdevs list while >> usb speed mismatch occurs. >> >> Signed-off-by: Lin Ma >> --- > The changing remarks should be lay up here, > and use v2 suffix instead of v1. > > If you do this, you can add my R-by. > Reviewed-by: Gonglei > > Please refer to: > http://wiki.qemu.org/Contribute/SubmitAPatch > > Regards, > -Gonglei I must be getting tired, Sorry about that. >> hw/usb/host-libusb.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c >> index bc2944c..11429f5 100644 >> --- a/hw/usb/host-libusb.c >> +++ b/hw/usb/host-libusb.c >> @@ -889,6 +889,9 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev) >> fail: >> trace_usb_host_open_failure(bus_num, addr); >> if (s->dh != NULL) { >> + usb_host_release_interfaces(s); >> + libusb_reset_device(s->dh); >> + usb_host_attach_kernel(s); >> libusb_close(s->dh); >> s->dh = NULL; >> s->dev = NULL; >> > > >