Re-attach usb device to kernel while usb_host_open fails
PATCH v2 1/1 Re-attach usb device to kernel while usb_host_open fails
Signed-off-by Lin Ma <[email protected]>
Reviewed-by Gonglei <[email protected]>
---
Changes in V2:
* For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs.
* Add missing R-by information.
hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+)
hw/usb/host-libusb.c +3 -0
@@ -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 ;
Signature · 1 line
2.1.4
Quoted 2 lines · Lin Ma
Signed-off-by Lin Ma <[email protected]>Reviewed-by Gonglei <[email protected]>
Added to usb patch queue.
thanks,
Gerd