On Mon, Sep 24, 2012 at 02:38:05PM -0700, Yuliya T wrote: > Dear Sarah, > We noticed a couple of problems with the Linux xHCI driver: > > 1. There is a problem with URB cancellation for USB 2.0 device on USB > 3.0 host. When we disable our device, we cancel all pending URBs by > calling ioctl with the request code of USBDEVFS_DISCARDURB. When we > re-enable our device, we submit new URBs, but when we try to reap > them, the program hangs (not every time, but pretty often). The same > code works if the device is plugged into the EHCI port, and we also > don't see any hanging with xHCI host if we don't do URB cancellation, > but have our device terminate URBs by sending zero-length packets > instead. Which host controller are you running under? Please send the output of `sudo lspci -vvv` and `sudo lspci -vvv -n`. Also, which version of libusb are you using? Is it libusb or libusb-x? What kind of endpoints are being used by your device? There was a problem with the bulk continuation flag under USB 3.0 devices, but I'm not sure if that was fixed in libusb/libusbx yet. Which kernel version are you using? Have you tested with the latest stable kernel (currently 3.5.4)? If so, can you recompile your kernel with CONFIG_USB_DEBUG and CONFIG_USB_XHCI_HCD_DEBUGGING and send me the dmesg from one of the runs when the program hangs? > 2. Clear Halt of EP does not reset the Sequence number if the device > is a USB 3.0 device, while it seems that clear halt properly resets > the toggle bits if the device is 2.0 even on an xHCI host. The xHCI driver will issue a Reset Endpoint command that should reset the sequence number. If you have xHCI debugging turned on, you should see output something like "Ignoring reset ep completion code" when the Reset Endpoint command completes. If you don't see that output, then the USB core or the xHCI driver isn't resetting the endpoints when you ask it to. Also note that the xHCI hardware will only allow the Reset Endpoint to complete if the endpoint was actually halted due to a stall, babble, transfer error, etc. It won't reset the endpoint toggles or sequence number at arbitrary points, so we can't reset the endpoint after a new alternate interface setting is installed. Sarah Sharp -- 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