All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel]  About usb passthru and speed mismatch
@ 2015-06-11 15:47 Lin Ma
  2015-06-16 13:21 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Lin Ma @ 2015-06-11 15:47 UTC (permalink / raw)
  To: kraxel; +Cc: qemu-devel

Hi Gerd,

Based on the current implementation of 'usb_host_open' in 
hw/usb/host-libusb.c,

When user performs usb_add, The usb device will be detached from kernel 
first, Then be checked for speed mismatch second.
If it found speed mismatch, The usb device isn't attached to guest, But 
the usb device can't be reattached to kernel either.

I'd like to write patch to add 'usb_check_attach' before detaching the 
device from kernel  _or_  add 'usb_host_attach_kernel' under 'fail:' of 
usb_host_open, (the latter doesn't make sense I think).
May I have your thoughts?


BTW, Have you missed a patch: "usb: Use usb_bus_find(-1) instead of 
usb_enabled() in usb_device_add/usb_device_del" which sending on June 
4th ? May I have your thoughts about that patch as well?


Thanks,
Lin

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

* Re: [Qemu-devel] About usb passthru and speed mismatch
  2015-06-11 15:47 [Qemu-devel] About usb passthru and speed mismatch Lin Ma
@ 2015-06-16 13:21 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2015-06-16 13:21 UTC (permalink / raw)
  To: lma; +Cc: qemu-devel

On Do, 2015-06-11 at 23:47 +0800, Lin Ma wrote:
> Hi Gerd,
> 
> Based on the current implementation of 'usb_host_open' in 
> hw/usb/host-libusb.c,
> 
> When user performs usb_add, The usb device will be detached from kernel 
> first, Then be checked for speed mismatch second.
> If it found speed mismatch, The usb device isn't attached to guest, But 
> the usb device can't be reattached to kernel either.
> 
> I'd like to write patch to add 'usb_check_attach' before detaching the 
> device from kernel  _or_  add 'usb_host_attach_kernel' under 'fail:' of 
> usb_host_open, (the latter doesn't make sense I think).

Re-attach to the kernel when open fails (for whatever reasons) makes
perfect sense to me.

cheers,
  Gerd

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

end of thread, other threads:[~2015-06-16 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 15:47 [Qemu-devel] About usb passthru and speed mismatch Lin Ma
2015-06-16 13:21 ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.