xHCI driver issue (ASMedia Controller using xhci_hcd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi list,

I originally posted this on libusb-devel [1], but got a friendly
redirect here by Alan Stern, hope this is the right place!

Let me describe my problem from a "user" standpoint before diving into
the technical details: USB 3.0 does not work on my PC flat out.
Sometimes USB 3.0 ports work for /some/ USB 2.0 devices, but most of the
time they don't at all (e.g. RS232 converters will show up at first but
have transmission errors once I open the tty device, etc.). If they do
work, they're flaky as hell. All USB 3.0 ports are, for all practical
purposes, unusable on my system (even with USB 2 devices attached).

Here's an example of a USB 3.0 device (ix500 scanner) and what happens
when I plug it in:

$ dmesg
[  167.736631] usb 8-1: new SuperSpeed USB device number 2 using xhci_hcd
[  167.756492] usb 8-1: New USB device found, idVendor=04c5, idProduct=132b
[  167.756497] usb 8-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[  167.756500] usb 8-1: Product: ScanSnap iX500
[  167.756503] usb 8-1: Manufacturer: Fujitsu

(note this is a freshly booted system, no previous suspend/hiberate
going on).

Then I try to scan with it:

$ scanimage
scanimage: open of device fujitsu:ScanSnap iX500:9768 failed: Error
during device I/O

No log output is shown in dmesg. Subsequent attempts to scan with the
device yield:

$ scanimage
scanimage: no SANE devices found

Note that the scanner works perfectly on my USB 2.0 ports of the system
and it works perfectly on the exact same USB 3.0 ports under Windows (I
bit the bullet, installed Windows 7, and tried that out just today).

Some details about my system: I'm using an MSI X99S-SLI PLUS (BIOS v1.9,
latest one) motherboard. The xhci controller is a ASMedia brand:

$ lspci -nn | grep -i asme
06:00.0 USB controller [0c03]: ASMedia Technology Inc. Device [1b21:1142]

I'm running Linux Mint x86_64. The problem occured with the stock
3.16.0-38-generic #52~14.04.1-Ubuntu SMP kernel, but I've also just now
compiled the latest stable 4.3.3 and can reproduce the exact same
problem with it.

Let's look at a strace of the first scanimage call:

$ strace -ff scanimage
[...]
open("/dev/bus/usb/008/005", O_RDWR)    = 3
ioctl(3, USBDEVFS_CLAIMINTERFACE, 0x7ffe9ccfa08c) = 0
ioctl(3, USBDEVFS_SUBMITURB, 0x7ffe9ccf9ec0) = 0
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = 0
ioctl(3, USBDEVFS_SUBMITURB, 0x7ffe9ccf9ec0) = 0
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = -1 EAGAIN (Resource
temporarily unavailable)
select(4, NULL, [3], NULL, {0, 1000})   = 0 (Timeout)
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = -1 EAGAIN (Resource
temporarily unavailable)
select(4, NULL, [3], NULL, {0, 1000})   = 0 (Timeout)
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = -1 EAGAIN (Resource
temporarily unavailable)

[this repeats about 1300 times, interrupted two times by:]

ioctl(3, USBDEVFS_DISCARDURB, 0x7ffe9ccf9ec0) = 0
ioctl(3, USBDEVFS_REAPURB, 0x7ffe9ccf9e88) = 0
ioctl(3, SNDRV_CTL_IOCTL_ELEM_UNLOCK or USBDEVFS_CLEAR_HALT,
0x7ffe9ccf9f9c) = 0
ioctl(3, USBDEVFS_SUBMITURB, 0x7ffe9ccf9ec0) = 0
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = 0
ioctl(3, USBDEVFS_SUBMITURB, 0x7ffe9ccf9ec0) = 0

[and finally]

ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = -1 EAGAIN (Resource
temporarily unavailable)
select(4, NULL, [3], NULL, {0, 1000})   = 0 (Timeout)
ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7ffe9ccf9e88) = -1 EAGAIN (Resource
temporarily unavailable)
ioctl(3, USBDEVFS_DISCARDURB, 0x7ffe9ccf9ec0) = 0
ioctl(3, USBDEVFS_REAPURB, 0x7ffe9ccf9e88) = 0
ioctl(3, SNDRV_CTL_IOCTL_ELEM_UNLOCK or USBDEVFS_CLEAR_HALT,
0x7ffe9ccf9f9c) = 0
ioctl(3, USBDEVFS_SETINTERFACE, 0x7ffe9ccfa0b0) = 0
ioctl(3, SNDRV_CTL_IOCTL_ELEM_LIST or USBDEVFS_RELEASEINTERFACE,
0x7ffe9ccfa0dc) = 0
close(3)                                = 0
write(2, "scanimage: open of device fujits"..., 86scanimage: open of
device fujitsu:ScanSnap iX500:9768 failed: Error during device I/O
) = 86

Then, on the second call, during device discovery, something similar:

$ strace -ff scanimage
[...]
open("/dev/bus/usb/008/004", O_RDWR)    = 4
ioctl(4, USBDEVFS_CLAIMINTERFACE, 0x7ffdcbcacfbc) = 0
ioctl(4, USBDEVFS_SUBMITURB, 0x7ffdcbcacdf0) = 0
ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7ffdcbcacdb8) = 0
ioctl(4, USBDEVFS_SUBMITURB, 0x7ffdcbcacdf0) = 0
ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7ffdcbcacdb8) = -1 EAGAIN (Resource
temporarily unavailable)
select(5, NULL, [4], NULL, {0, 1000})   = 0 (Timeout)
ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7ffdcbcacdb8) = -1 EAGAIN (Resource
temporarily unavailable)
select(5, NULL, [4], NULL, {0, 1000})   = 0 (Timeout)
[... tons of repeats ...]
ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7ffdcbcacdb8) = -1 EAGAIN (Resource
temporarily unavailable)
select(5, NULL, [4], NULL, {0, 1000})   = 0 (Timeout)
ioctl(4, USBDEVFS_REAPURBNDELAY, 0x7ffdcbcacdb8) = -1 EAGAIN (Resource
temporarily unavailable)
ioctl(4, USBDEVFS_DISCARDURB, 0x7ffdcbcacdf0) = 0
ioctl(4, USBDEVFS_REAPURB, 0x7ffdcbcacdb8) = 0
ioctl(4, SNDRV_CTL_IOCTL_ELEM_UNLOCK or USBDEVFS_CLEAR_HALT,
0x7ffdcbcacecc) = 0
ioctl(4, USBDEVFS_SETINTERFACE, 0x7ffdcbcacfe0) = 0
ioctl(4, SNDRV_CTL_IOCTL_ELEM_LIST or USBDEVFS_RELEASEINTERFACE,
0x7ffdcbcad00c) = 0
close(4)

Note that there are no dmesg messages indicating a problem. However,
since kernel-space devices also have problems (like RS232 converters) on
USB 3.0 ports, I suspect a problem with xHCI, not libusb -- but I don't
know how to debug this further.

Has anyone a clue or could point me into the right direction? I really
would like to get this sorted out and USB 3.0 ports working on my system.

Best regards,
Johannes

[1] http://sourceforge.net/p/libusb/mailman/message/34728874/
--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux