qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails
@ 2015-06-24  3:39 Lin Ma
  2015-06-24  3:53 ` Gonglei
  0 siblings, 1 reply; 3+ messages in thread
From: Lin Ma @ 2015-06-24  3:39 UTC (permalink / raw)
  To: arei.gonglei, qemu-devel, kraxel; +Cc: Lin Ma

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 <lma@suse.com>
---
 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;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails
  2015-06-24  3:39 [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails Lin Ma
@ 2015-06-24  3:53 ` Gonglei
  2015-06-24  5:35   ` Lin Ma
  0 siblings, 1 reply; 3+ messages in thread
From: Gonglei @ 2015-06-24  3:53 UTC (permalink / raw)
  To: Lin Ma, qemu-devel, kraxel

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 <lma@suse.com>
> ---

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 <arei.gonglei@huawei.com>

Please refer to:
http://wiki.qemu.org/Contribute/SubmitAPatch

Regards,
-Gonglei

>  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;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails
  2015-06-24  3:53 ` Gonglei
@ 2015-06-24  5:35   ` Lin Ma
  0 siblings, 0 replies; 3+ messages in thread
From: Lin Ma @ 2015-06-24  5:35 UTC (permalink / raw)
  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 <lma@suse.com>
>> ---
> 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 <arei.gonglei@huawei.com>
>
> 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;
>>
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-24  5:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-24  3:39 [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails Lin Ma
2015-06-24  3:53 ` Gonglei
2015-06-24  5:35   ` Lin Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).