Hello Sarah, > On Wed, Jul 14, 2010 at 01:28:17PM +0200, Hoefle Marco wrote: > > Hello Sarah, > > sorry for writing directly to you but you might be able to give me an hint to get your xHCI driver working on a powerpc system. > > I already posted to the linux-usb list but I got a rejection email. > > I have never tested the driver on a powerpc system. I suspect that > since it's a big endian system, this has issues. All the xHCI registers > are little endian, and the values in the data structures are supposed to > be little endian. So the driver is probably writing backwards values to > the host controller, which would cause the hardware to be very confused. Sounds a reasonable explanation. I think it would be good and Linux conform if the driver is platform independent (I hope your employer agrees :)) > I'm not sure I have time to work on a fix for this. Do you think you > could make a patch? Basically, any hardware register value or data > structure the hardware must use (slot context, device context, endpoint > context, endpoint rings, TRBs in the rings, etc.) must be written in as > a little endian value. You would need to add a lot of cpu_to_le() > calls. I try to make a patch but I need your help for this as my knowledge in Linux device drivers is limited and a USB3.0 driver is not one for beginners to start with. > > I am trying the new USB 3.0 support in the latest git clone (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git). > > I have a NEC based PCIe USB3.0 card plugged into a powerpc system (P1020EDB). > > The card is detected and the driver is loaded but usb devices are not recognized. > > After a few seconds this message is logged: > > > > xhci_hcd 0000:01:00.0: Timeout while waiting for a slot > > hub 1-0:1.0: couldn't allocate port 3 usb_device > > Can you turn on CONFIG_USB_XHCI_HCD_DEBUGGING and send me the log? It is already on but there is not much activity in the kernel log: [root@P1020RDB tmp]# cp /proc/config.gz /tmp/ [root@P1020RDB tmp]# gunzip config.gz [root@P1020RDB tmp]# cat /tmp/config | grep XHCI CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_HCD_DEBUGGING=y [root@P1020RDB tmp]# dmesg | grep xhci [ 1.574775] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 1.580034] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2 [ 1.587609] xhci_hcd 0000:01:00.0: irq 16, io mem 0xa0000000 [ 1.605112] xHCI xhci_add_endpoint called for root hub [ 1.605122] xHCI xhci_check_bandwidth called for root hub [ 21.820354] xhci_hcd 0000:01:00.0: Timeout while waiting for a slot [root@P1020RDB /]# cat /sys/kernel/debug/usb/devices T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=?? MxCh= 4 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1 P: Vendor=1d6b ProdID=0003 Rev= 2.06 S: Manufacturer=Linux 2.6.35-rc4+ xhci_hcd S: Product=xHCI Host Controller S: SerialNumber=0000:01:00.0 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=12ms -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html