On 3 December 2012 11:58, walimis <walimis...@gmail.com> wrote:
> For example, xilinx_zynq has two EHCI controllers. If I specify a usb
> device of type "usb-storage", the question is: which EHCI controller does the
> usb device attach to? The answer is dependent.
>
> 1. If I use "usbdevice" and pass the host usb device, such as:
>
> $ qemu -usb  -usbdevice host:xxxx:xxxx
>
> The device will attach to the first EHCI controller.
>
> 2. If I use "device" and "usb-storage", such as:
>
> $ qemu -usb -device usb-storage,drive=ud -drive id=ud,file=usbdisk.img,if=none
>
> The device will attach to the second EHCI controller.

This is a long standing bug which is caused by the legacy
-usbdevice search looking through the list of usb buses
in one direction, and the generic -device code looking
through it in the other direction:

http://lists.gnu.org/archive/html/qemu-devel/2011-06/msg00926.html

> Qemu doesn't provide some properties, such as "bus", to specify which EHCI 
> controller the
> usb device attach to.  If we use "device" and "usb-storage", we never attach 
> the usb
> device to the specified EHCI controller.

-device certainly ought to let you specify a bus= property;
you want to be able to specify the USB controller regardless
of whether we sort out the ordering mess. If that doesn't
work then we have a different bug.

-- PMM

Reply via email to