From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfUqj-0007i4-7v for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:10:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfUqd-0004lh-6f for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:10:13 -0500 Received: from mail-ia0-f173.google.com ([209.85.210.173]:45837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfUqd-0004fM-29 for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:10:07 -0500 Received: by mail-ia0-f173.google.com with SMTP id w21so2045843iac.4 for ; Mon, 03 Dec 2012 04:10:03 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20121203115812.GC6029@pek-lwang0-d1> References: <1354417042-8818-1-git-send-email-andreas.faerber@web.de> <20121202103453.GA6029@pek-lwang0-d1> <50BB8164.9040308@web.de> <50BC4DEB.7080303@redhat.com> <20121203115812.GC6029@pek-lwang0-d1> Date: Mon, 3 Dec 2012 12:10:02 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH RFT 0/5] usb: Clean up and extend SysBus EHCI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: walimis Cc: peter.crosthwaite@xilinx.com, Vincent Palatin , qemu-devel@nongnu.org, andreas.faerber@web.de, Gerd Hoffmann , Igor Mitsyanko On 3 December 2012 11:58, walimis 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