Bug 1240798 - xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11
Summary: xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-07 19:11 UTC by Andrew Gillis
Modified: 2020-01-17 22:31 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
test patch (939 bytes, application/mbox)
2015-07-11 00:26 UTC, Laura Abbott
no flags Details
test patch v2 (1005 bytes, application/mbox)
2015-07-16 23:11 UTC, Laura Abbott
no flags Details
test patch for kernel 4.0.7 (works on 4.3.6 too) (4.73 KB, patch)
2016-03-11 23:10 UTC, Fryderyk Wrobel
no flags Details | Diff
test patch tested on 4.5-rc4 (5.76 KB, patch)
2016-03-11 23:11 UTC, Fryderyk Wrobel
no flags Details | Diff

Description Andrew Gillis 2015-07-07 19:11:31 UTC
Description of problem: Error occurs with USB DAC or other USB devices if a NEC uPD72020x based USB card is used.

Version-Release number of selected component (if applicable):


How reproducible:
You need a NEC uPD72020x based USB card and one of the affected devices. I am using a Berkeley Audio Design Alpha DAC.


Steps to Reproduce:
1. plug in DAC. DAC comes up as OK
2. Play music to the DAC using ALSA
3. Playback fails

Actual results: Error in syslog
Jul 07 13:59:26 sonicorbiter kernel: xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11.
Jul 07 13:59:26 sonicorbiter kernel: usb 1-1.1: Not enough bandwidth for altsetting 1
Jul 07 13:59:26 sonicorbiter kernel: usb 1-1.1: 1:1: usb_set_interface failed (-22)


Expected results:

audio playback


Additional info: This bug has been reported in one form or another for several years. The bug reports keep getting closed because it can't be reproduced. Unfortunately you need very specific hardware to get the failure. It all revolves around the NEC uPD72020x USB card.

Comment 1 Laura Abbott 2015-07-07 23:45:21 UTC
Can you share the full kernel logs after you run "echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control" as root?

Comment 2 Andrew Gillis 2015-07-08 20:50:00 UTC
OK I 

- ran that echo command
- removed and reconnected my DAC to the NEC USB port
- dumped the kernel log with journalctl -k

This is the log

http://paste.fedoraproject.org/241610/43638786


You may notice I'm using a 4.2 kernel but the same thing happens on a stock Fedora kernel. I can do this test again with a sock kernel if you need me to. I could see there were some patches to the USB stack in 4.2

Comment 3 Laura Abbott 2015-07-11 00:26:33 UTC
Created attachment 1050837 [details]
test patch

A bit of a long shot but can you test the following patch? This went in for other USB devices which had other kinds of problems.

Comment 4 Andrew Gillis 2015-07-13 21:13:48 UTC
I tested it and it doesn't seem to make any difference. This is the log

http://paste.fedoraproject.org/243976/21141143

I want back to the 4.0.7 (latest F22 release) kernel for this test. Should I have stayed with the 4.2.0 kernel?

Comment 5 Andrew Gillis 2015-07-13 21:20:12 UTC
Also looking more at this patch it seems like it only does something for RENESAS pdev->device == 0x0015. So my guess is this does nothing for my NEC USB port.

Comment 6 Laura Abbott 2015-07-13 22:19:45 UTC
My research showed that it was a NEC/Renesas USB card so I went with the Renesas USB id. If you want to double check, you can do lspci -vvv. If it matches then this bug needs to be reported to the upstream linux usb list, linux-usb.org.

Comment 7 Andrew Gillis 2015-07-14 00:40:22 UTC
OK I understand now. And yes you are correct that controller comes up as Renesas. This is the output of the lspci -vvv

http://paste.fedoraproject.org/244017/68316911/

So what do I need to do next to try and resolve this bug?

-Andrew

Comment 8 Andrew Gillis 2015-07-14 13:35:47 UTC
Also look at this output from lspci -nn

http://paste.fedoraproject.org/244047/68429041/


My device look like it's pdev->device is 0014 not 0015 that the patch is looking for. Is that true?

Comment 9 Laura Abbott 2015-07-16 23:11:09 UTC
Created attachment 1052882 [details]
test patch v2

Can you try this patch? It adds the quirk for your pdev device. I also stuck a debug print in there so you can check in the kernel log.

Comment 10 Andrew Gillis 2015-07-17 02:09:17 UTC
I actually already tried this. I just replaced the 0015 with 0014 in you old patch. It didn't seem to make any difference.

Comment 11 Laura Abbott 2015-07-25 00:35:47 UTC
I'd recommend sending this report to mathias.nyman, 
linux-usb.org, and linux-kernel.org . That's going to be the best way to get this fixed at this point.

Comment 12 Fryderyk Wrobel 2016-03-11 23:10:56 UTC
Created attachment 1135447 [details]
test patch for kernel 4.0.7 (works on 4.3.6 too)

Comment 13 Fryderyk Wrobel 2016-03-11 23:11:50 UTC
Created attachment 1135448 [details]
test patch tested on 4.5-rc4

Comment 14 Fryderyk Wrobel 2016-03-11 23:24:16 UTC
Hi,

I found came across this bug too and started digging. It appears that 
Renesas uPD72020{1,2} USB 3.0 HC fail to allocate the bandwidth for high speed
interfaces with isoc endpoints where async feedback endpoint's bInterval > 6.

I found two audio devices that exposed this bug.
 * Amanero Combo384 USB->I2S converter with firmware 1074
 * Chord Hugo USB DAC

I attached the patches with workaround (a quirk): the one tested with kernel 4.0.7 and 4.3.6 and the one tested with kernel 4.5-rc4.

I am not sure if the workaround is correct way of solving this problem. I may be missing a bigger picture.

Kind Regards,
Fryderyk

Comment 15 Marcin Ostapowicz 2016-03-23 09:38:17 UTC
(In reply to Fryderyk Wrobel from comment #14)
> Hi,
> 
> I found came across this bug too and started digging. It appears that 
> Renesas uPD72020{1,2} USB 3.0 HC fail to allocate the bandwidth for high
> speed
> interfaces with isoc endpoints where async feedback endpoint's bInterval > 6.
> 
> I found two audio devices that exposed this bug.
>  * Amanero Combo384 USB->I2S converter with firmware 1074
>  * Chord Hugo USB DAC
> 
> I attached the patches with workaround (a quirk): the one tested with kernel
> 4.0.7 and 4.3.6 and the one tested with kernel 4.5-rc4.
> 
> I am not sure if the workaround is correct way of solving this problem. I
> may be missing a bigger picture.
> 
> Kind Regards,
> Fryderyk

Hi Fryderyk, 

Thanks for updating the patch. Do you know if this patch will work with kernel 3.12.5?
I'd appreciate your input.

Best regards, 
Marcin

Comment 16 Fryderyk Wrobel 2016-03-31 15:12:25 UTC
No, I have not checked the patch with 3.12.5.

Comment 17 Saam 2016-04-07 03:22:32 UTC
Hope I am not too late to the party.  I experience identical symptoms using a USB 2.0 audio interface (a Focusrite Scarlett 18i20).  I am not familiar with exactly how to use the patch links provided by Fryderyk.  Do I simply save them to a text file and save it in a particular location?  Any help would be much appreciated.  I have been stuck on this problem for over a month now.


Note You need to log in before you can comment on or make changes to this bug.