From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfmK3-0007ur-Fm for qemu-devel@nongnu.org; Tue, 04 Dec 2012 01:49:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfmJx-0005Vn-5T for qemu-devel@nongnu.org; Tue, 04 Dec 2012 01:49:39 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:47810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfmJw-0005UD-U7 for qemu-devel@nongnu.org; Tue, 04 Dec 2012 01:49:33 -0500 Received: by mail-pa0-f45.google.com with SMTP id bg2so2350510pad.4 for ; Mon, 03 Dec 2012 22:49:31 -0800 (PST) Date: Tue, 4 Dec 2012 14:49:09 +0800 From: walimis Message-ID: <20121204064909.GH6029@pek-lwang0-d1> References: <1354153398-13569-1-git-send-email-peter.crosthwaite@xilinx.com> <20121129020041.GB3127@walimis-DELL> <20121203120309.GD6029@pek-lwang0-d1> <50BCA034.2090301@redhat.com> <20121203145020.GF6029@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 1.3] ehci-sysbus: Attach DMA context. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: david.holsgrove@xilinx.com, john.williams@xilinx.com, Gerd Hoffmann , qemu-devel@nongnu.org On Tue, Dec 04, 2012 at 03:16:09PM +1000, Peter Crosthwaite wrote: >Hi Liming, Gerd, > >On Tue, Dec 4, 2012 at 12:50 AM, walimis wrote: >> On Mon, Dec 03, 2012 at 01:51:00PM +0100, Gerd Hoffmann wrote: >>> Hi, >>> >>>> As said in another mail, I found that the root cause is that xilinx_zynq has >>>> two EHCI controller. If we use usb-storage disk, the disk will be attached to >>>> the second EHCI controller, which the kernel uses the first EHCI controller >>>> by default. >>> > >I am using a device tree driven kernel with this: > > ps7_usb_0: ps7-usb@e0002000 { > compatible = "xlnx,ps7-usb-1.00.a"; > dr_mode = "host"; > interrupt-parent = <&ps7_scugic_0>; > interrupts = < 0 21 0 >; > phy_type = "ulpi"; > reg = < 0xe0002000 0x1000 >; > xlnx,usb-reset = <0xffffffff>; > } ; > ps7_usb_1: ps7-usb@e0003000 { > compatible = "xlnx,ps7-usb-1.00.a"; > dr_mode = "host"; > interrupt-parent = <&ps7_scugic_0>; > interrupts = < 0 44 0 >; > phy_type = "ulpi"; > reg = < 0xe0003000 0x1000 >; > xlnx,usb-reset = <0xffffffff>; > } ; > >And it now works for me, device successfully attaches to second controller: OK, that's good. > > | usb 2-1: New USB device found, idVendor=46f4, idProduct=0001 > | usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > | usb 2-1: Product: QEMU USB HARDDRIVE > | usb 2-1: Manufacturer: QEMU > | usb 2-1: SerialNumber: 1-1 > >>>For the linux kernel it shouldn't matter where the usb stick is >>>connected. Assuming it finds both ehci controllers. Does it? >> > >Gerd, > >Is there any documentation out there on how to tell QEMU on command >line which EHCI you want your usb-storage to attach to? > >> The default device tree of linux kernel has only the first ehci controller >> support, so the kernel can't detect the second controller. >> But the usb-storage disk is attached to the second controller, so that >> the disk is failed to be detected by the linux kernel. >> >> >>> >>>> For now, qemu doesn't support two EHCI controller, could we remove the second >>>> EHCI from xilinx_zynq? >>> > >Prefer not. Just need a better kernel and DTB. This was definitely >broken for me recently, but I have pulled patches in my kernel, so I >think this has been fixed by the Xilinx kernel devels. OK, no problem. Regards, Liming Wang > >Regards, >Peter > >>>Two controllers should work just fine. I'd suggest to find the root >> >> Yes, they work fine separately, but I don't know how to use them at the >> same time (I mean both controller have device attached) as I have >> mentioned in the another mail. >> >> Liming Wang >> >>>cause instead of doctoring like this. ehci + usb core are fine with two >>>controllers & busses, maybe the arch plumbing (device tree?) misses >>>something so the linux kernel doesn't find the second ehci controller. >>> >>>cheers, >>> Gerd >>> >>