Hi,
I'm trying to get USB 3.0 running through the PCIe slot. I have been using two different USB 3.0 cards, one with a NEC and one with a VLI chip, but have experienced (different) problems with each. My hardware design very closely matches the PCIe reference design, and I'm running a small Linux system based on the Xilinx kernel v2015.4.01 (Linux 4.0.0).
The PCI bridge is correctly detected at boot, as is the USB PCIe card. USB devices that are plugged-in are detected and some actually seem to work without problems. I tested a USB 3.0 flash drive which seemed to work fine with both cards, and gets a read speed of 55 MB/s.
Problems seem to occur when I use devices with higher data rates. I have two different USB3 cameras from different manufacture. Both work well when connected to the USB2 ports, or to a USB3 port on a Linux PC. When connected to one of the PCIe cards I experience the following problems
NEC Card
========
For the first camera, reading and writing the camera settings work but when starting the image transfer I see the following errors:
usb 2-2: usbfs: process 9843 did not claim interface 2 before use
usb 2-1: usbfs: process 9843 did not claim interface 2 before use
xhci_hcd 0000:01:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?
The other camera works when configured to small image sizes, but the frame rate drastically drops when transferring large images (like 1 frame per second)
VLI Card
========
The first camera doesn't work at all (not even reading / writing settings). No error is logged, only read-errors from the user space application.
The second camera again works well with small image sizes, but when configured to larger sizes, I receive USB disconnects and re-connects:
usb 2-2: USB disconnect, device number 5
usb 2-2: new SuperSpeed USB device number 8 using xhci_hcd
usb 2-2: New USB device found, idVendor=1409, idProduct=3240
usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-2: Product: USB 3.0 Camera
usb 2-2: Manufacturer: Camera Manufacturer
======
So, I suppose there is a compatibility problem with the PCI-bridge and the USB3 cards when transferring high-bandwidth data. I receive some PCI errors during boot which might be related. Here are all PCI-related kernel messages:
xilinx-pcie 50000000.axi-pcie: PCIe Link is UP
PCI host bridge /amba/axi-pcie@50000000 ranges:
No bus range found for /amba/axi-pcie@50000000, using [bus 00-ff]
MEM 0x60000000..0x6fffffff -> 0x60000000
xilinx-pcie 50000000.axi-pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
PCI: bus1: Fast back to back transfers disabled
pci 0000:00:00.0: BAR 0: no space for [mem size 0x40000000]
pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x40000000]
pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x60001fff 64bit]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
pci 0000:00:00.0: enabling device (0140 -> 0142)
pci 0000:01:00.0: enabling device (0140 -> 0142)
I couldn't really fix the memory assignment error. However, the messages seem to match the logs posted by other users. For completion, the USB related messages are as follows:
xhci_hcd 0000:01:00.0: xHCI Host Controller
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
xhci_hcd 0000:01:00.0: hcc params 0x014051cf hci version 0x100 quirks 0x00000090
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: xHCI Host Controller
usb usb1: Manufacturer: Linux 4.0.0-xilinx xhci-hcd
usb usb1: SerialNumber: 0000:01:00.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
xhci_hcd 0000:01:00.0: xHCI Host Controller
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: xHCI Host Controller
usb usb2: Manufacturer: Linux 4.0.0-xilinx xhci-hcd
usb usb2: SerialNumber: 0000:01:00.0
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
Also, the relevant section of the device tree is as follows:
pci_express: axi-pcie@50000000 {
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
compatible = "xlnx,axi-pcie-host-1.00.a";
reg = < 0x50000000 0x04000000 >;
device_type = "pci";
tinterrupts = < 0 33 4 >;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie_intc 1>,
<0 0 0 2 &pcie_intc 2>,
<0 0 0 3 &pcie_intc 3>,
<0 0 0 4 &pcie_intc 4>;
ranges = < 0x02000000 0 0x60000000 0x60000000 0 0x10000000 >;
pcie_intc: interrupt-controller {
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
};
};
I know that the interrupt number is a bit odd, but that is correct (I have a few more things connected to IRQ_F2P). The interrupt is called, as I can see in /proc/interrupts.
I haven't yet tried any other PCIe cards, as I don't have any lying around. I'm really out of ideas on this problem by now. Any suggestions would be greatly welcome.
Thanks!