From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfVIR-0005VA-MY for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:38:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfVIL-0004CG-Q1 for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:38:51 -0500 Received: from mail-bk0-f45.google.com ([209.85.214.45]:45912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfVIL-0004BK-FZ for qemu-devel@nongnu.org; Mon, 03 Dec 2012 07:38:45 -0500 Received: by mail-bk0-f45.google.com with SMTP id jk13so944037bkc.4 for ; Mon, 03 Dec 2012 04:38:44 -0800 (PST) Date: Mon, 3 Dec 2012 20:38:21 +0800 From: walimis Message-ID: <20121203123821.GE6029@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Peter Maydell Cc: peter.crosthwaite@xilinx.com, Vincent Palatin , qemu-devel@nongnu.org, andreas.faerber@web.de, Gerd Hoffmann , Igor Mitsyanko On Mon, Dec 03, 2012 at 12:10:02PM +0000, Peter Maydell wrote: >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; Sorry, I don't know the bus= property. But why both EHCI controller are named "usb-bus.0"? How to distinguish the different usb usb? Liming Wang >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