Bug 199627 - Renesas Technology Corp. uPD720202 USB 3.0 Host Controller doesn't work (INITIALIZED TWICE tough only one root hub!!)
Summary: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller doesn't work (INIT...
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: io_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-05 15:58 UTC by Marcus Mönius
Modified: 2020-10-11 04:07 UTC (History)
9 users (show)

See Also:
Kernel Version: 4.16.5-1-ARCH
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg for xhci_hcd (Renesas Technology Corp. uPD720202 USB 3.0 Host Controller) (70.44 KB, text/plain)
2018-05-05 15:58 UTC, Marcus Mönius
Details
[NEW] dmesg with debugging xhci_hcd enabled and grep xhci_hcd (38.25 KB, text/plain)
2018-05-12 08:49 UTC, Marcus Mönius
Details
Full dmesg output with iommu=on (101.07 KB, text/plain)
2020-01-09 10:34 UTC, Frederik Carlier
Details
Full dmesg output without iommu (91.66 KB, text/plain)
2020-01-09 10:48 UTC, Frederik Carlier
Details

Description Marcus Mönius 2018-05-05 15:58:29 UTC
Created attachment 275781 [details]
dmesg for xhci_hcd (Renesas Technology Corp. uPD720202 USB 3.0 Host Controller)

The host controller "05:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)" (from lspci -nn) fails with the message:

xhci_hcd 0000:05:00.0: xHCI host controller not responding, assume dead

xhci_hcd 0000:05:00.0: HC died; cleaning up

This message is displayed twice on startup and the host controller seems to be initialized twice, even tough there is only one root hub.

Dmesg here: https://pastebin.com/raw/rcMUJDA9

The BUG may be, that it is initialized twice even though there is only one root hub.

More information here: https://unix.stackexchange.com/questions/440741/install-usb-3-0-express-card-under-linux-arch-linux-tried-adding-kernel-param
Comment 1 Marcus Mönius 2018-05-05 16:03:11 UTC
UPDATE:

It worked now at least once! Maybe fixed through software update.

I don't now if it will work continuously yet.
Comment 2 Marcus Mönius 2018-05-05 16:16:09 UTC
It didn't help. It still does not work after reboot.
Comment 3 Marcus Mönius 2018-05-12 08:47:43 UTC
My kernel version is: 4.16.6-1-ARCH

dmesg with debugging xhci_hcd enabled and grep xhci_hcd: https://pastebin.com/raw/qpTZSkAY
Comment 4 Marcus Mönius 2018-05-12 08:49:46 UTC
Created attachment 275941 [details]
[NEW] dmesg with debugging xhci_hcd enabled and grep xhci_hcd

debugged using grub kernel parameter "xhci_hcd.dyndbg=+p"
Comment 5 Martin Steigerwald 2018-08-09 20:01:57 UTC
Is this working again? I am considering to buy a CSL Computer Express card with two ports with Renesas Tech uPD720202 chip set. I read the dual initialization may be due to the card having two ports (but one root hub). So I am considering to buy a card with one port instead if this is not yet fixed.
Comment 6 Marcus Mönius 2018-08-15 16:49:51 UTC
@Martin Steigerwald

As far as I can tell this is not fixed yet! Just tested my CSL card with Renesas Tech uPD720202 chip set and 2 USB Ports with the kernel 4.17.14.arch1-1 and it did not work.

If you decide to buy a card with 1 USB Port and Renesas Tech uPD720202 chip set, then *please* report if it worked here: https://bbs.archlinux.org/viewtopic.php?id=236806&p=2 and which kernel you used (command to show kernel version is: uname -r)
Comment 7 Marcus Mönius 2018-08-25 20:45:39 UTC
(In reply to Martin Steigerwald from comment #5)
> Is this working again? I am considering to buy a CSL Computer Express card
> with two ports with Renesas Tech uPD720202 chip set. I read the dual
> initialization may be due to the card having two ports (but one root hub).
> So I am considering to buy a card with one port instead if this is not yet
> fixed.
Comment 8 Marcus Mönius 2018-08-25 20:46:15 UTC
(In reply to Martin Steigerwald from comment #5)
> Is this working again? I am considering to buy a CSL Computer Express card
> with two ports with Renesas Tech uPD720202 chip set. I read the dual
> initialization may be due to the card having two ports (but one root hub).
> So I am considering to buy a card with one port instead if this is not yet
> fixed.

As far as I can tell this is not fixed yet! Just tested my CSL card with Renesas Tech uPD720202 chip set and 2 USB Ports with the kernel 4.17.14.arch1-1 and it did not work.

If you decide to buy a card with 1 USB Port and Renesas Tech uPD720202 chip set, then *please* report if it worked here: https://bbs.archlinux.org/viewtopic.php?id=236806&p=2 and which kernel you used (command to show kernel version is: uname -r)
Comment 9 Andrew Kroll 2018-11-25 10:26:51 UTC
```
It's been a long LONG time since I have done any kernel hacking... 15+ years?
but...
I found a fix for this chipset that works for me.
This is the test that I ran.

03:00.0 USB Controller: Renesas Technology Corp. Device 0015 (rev 02)
echo 0 > /sys/bus/pci/devices/0000\:03\:00.0/msi_bus
rmmod xhci_pci
modprobe xhci_pci

All the annoying problems after this go away.
Attach detach events that I have seen are no longer missed, which wedge this chipset.
Heavy loads on USB also no longer wedge.

And, best of all...

I longer need a power cycle when it gets wedged... because it no longer gets wedged.

I suggest quirk XHCI_BROKEN_MSI for this chipset.
xhci->quirks |= XHCI_BROKEN_MSI;

I think the firmware on this particular device have a bug when dealing with MSI's.

I'll be patching my own kernels 'till this is actually fixed. ;-)
```
Comment 10 Martin Steigerwald 2018-12-19 13:09:46 UTC
Andrew, many thanks for your comments.

With a CSL-Computer USB 3.0 Super Speed PCMCIA Express Card with two USB 3 ports I received today I did this:

% lspci -nn | grep Renesas
05:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)
% uname -a
Linux merkaba 4.20.0-rc6-tp520 #2 SMP PREEMPT Mon Dec 10 10:59:51 CET 2018 x86_64 GNU/Linux
% echo 0 > /sys/bus/pci/devices/0000\:05\:00.0/msi_bus
% rmmod xhci_pci
% lsmod | grep xhci_pci
% modprobe xhci_pci

And got:

[125086.629476] pci 0000:05:00.0: MSI/MSI-X disallowed for future drivers

[125122.626988] xhci_hcd 0000:05:00.0: xHCI Host Controller
[125122.627019] xhci_hcd 0000:05:00.0: new USB bus registered, assigned bus number 3
[125168.407973] xhci_hcd 0000:05:00.0: can't setup: -110
[125168.407981] xhci_hcd 0000:05:00.0: USB bus 3 deregistered
[125168.408060] xhci_hcd 0000:05:00.0: init 0000:05:00.0 fail, -110
[125168.408068] xhci_hcd: probe of 0000:05:00.0 failed with error -110

The card seems to detect the an USB stick I plug in, as the stick LED lights up briefly. However nothing else happens.

Any idea?

Unfortunately that card fits so tightly that I have no idea how to ever remove it from this ThinkPad T520 again.

I am using self-compiled kernel, but regarding special RENESAS support I see no differences to Debian kernel:

% grep RENESAS /boot/config-4.20.0-rc6-tp520 
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_RENESAS_PHY is not set
% grep RENESAS /boot/config-4.18.0-3-amd64  
CONFIG_NET_VENDOR_RENESAS=y
# CONFIG_RENESAS_PHY is not set

However will test with Debian kernel as well.
Comment 11 Martin Steigerwald 2018-12-19 13:31:23 UTC
Same with 4.18.0-3-amd64.

Card is detected as PCI card, but not as USB hub:

% lspci -nn | grep -i usb    
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
05:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)

% lsusb | grep -i hub    
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 012: ID 2109:2811 VIA Labs, Inc. Hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


In dmesg with 4.18 debian kernel I also saw this:

Dec 19 14:14:05 merkaba kernel: [   28.960064]  0-....: (5249 ticks this GP) idle=7d2/1/4611686018427387906 softirq=302/302 fqs=2238 
Dec 19 14:14:05 merkaba kernel: [   28.960139]   (t=5251 jiffies g=-220 c=-221 q=2531)
Dec 19 14:14:05 merkaba kernel: [   28.960198] NMI backtrace for cpu 0
Dec 19 14:14:05 merkaba kernel: [   28.960254] CPU: 0 PID: 119 Comm: systemd-udevd Not tainted 4.18.0-3-amd64 #1 Debian 4.18.20-2
Dec 19 14:14:05 merkaba kernel: [   28.960330] Hardware name: LENOVO 42433WG/42433WG, BIOS 8AET69WW (1.49 ) 06/14/2018
Dec 19 14:14:05 merkaba kernel: [   28.960403] Call Trace:
Dec 19 14:14:05 merkaba kernel: [   28.960457]  <IRQ>
Dec 19 14:14:05 merkaba kernel: [   28.960515]  dump_stack+0x5c/0x7b
Dec 19 14:14:05 merkaba kernel: [   28.960572]  nmi_cpu_backtrace+0x89/0x90
Dec 19 14:14:05 merkaba kernel: [   28.960637]  ? lapic_can_unplug_cpu+0xa0/0xa0
Dec 19 14:14:05 merkaba kernel: [   28.960693]  nmi_trigger_cpumask_backtrace+0xf5/0x130
Dec 19 14:14:05 merkaba kernel: [   28.960752]  rcu_dump_cpu_stacks+0x9b/0xcb
Dec 19 14:14:05 merkaba kernel: [   28.960808]  rcu_check_callbacks+0x65b/0x8a0
Dec 19 14:14:05 merkaba kernel: [   28.960865]  ? tick_sched_do_timer+0x60/0x60
Dec 19 14:14:05 merkaba kernel: [   28.960922]  update_process_times+0x28/0x50
Dec 19 14:14:05 merkaba kernel: [   28.960978]  tick_sched_handle+0x21/0x70
Dec 19 14:14:05 merkaba kernel: [   28.961033]  tick_sched_timer+0x37/0x70
Dec 19 14:14:05 merkaba kernel: [   28.961089]  __hrtimer_run_queues+0x108/0x290
Dec 19 14:14:05 merkaba kernel: [   28.961145]  hrtimer_interrupt+0xe5/0x240
Dec 19 14:14:05 merkaba kernel: [   28.961202]  smp_apic_timer_interrupt+0x6a/0x130
Dec 19 14:14:05 merkaba kernel: [   28.961258]  apic_timer_interrupt+0xf/0x20
Dec 19 14:14:05 merkaba kernel: [   28.961314]  </IRQ>
Dec 19 14:14:05 merkaba kernel: [   28.961374] RIP: 0010:xhci_reset+0x75/0x180 [xhci_hcd]
Dec 19 14:14:05 merkaba kernel: [   28.961430] Code: d3 00 00 00 4c 8b 65 18 bb 80 96 98 00 eb 17 a8 02 74 3f bf c7 10 00 00 e8 e8 d4 4b ea 83 eb 01 0f 84 dc 00 00 00 41 8b 04 24 <83> f8 ff 75 e0 b8 ed ff ff ff 5b 5d 41 5c c3 48 8b 07 48 c7 c6 f0 
Dec 19 14:14:05 merkaba kernel: [   28.961554] RSP: 0018:ffffb37601e87a58 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13
Dec 19 14:14:05 merkaba kernel: [   28.961627] RAX: 0000000000000002 RBX: 000000000051f282 RCX: 00000021e938e5a1
Dec 19 14:14:05 merkaba kernel: [   28.961687] RDX: 00000000000009d0 RSI: 0000000000000000 RDI: 00000000000009a9
Dec 19 14:14:05 merkaba kernel: [   28.961749] RBP: ffff9c15850d2230 R08: 0000000000000001 R09: ffffb37601e87a94
Dec 19 14:14:05 merkaba kernel: [   28.961810] R10: 0000000000000000 R11: ffff9c1584c825e4 R12: ffffb37601da4020
Dec 19 14:14:05 merkaba kernel: [   28.961871] R13: ffffffffc029d2d0 R14: ffff9c15850d2230 R15: ffff9c15850d2000
Dec 19 14:14:05 merkaba kernel: [   28.961934]  ? xhci_pci_suspend+0xd0/0xd0 [xhci_pci]
Dec 19 14:14:05 merkaba kernel: [   28.961995]  ? xhci_reset+0x68/0x180 [xhci_hcd]
Dec 19 14:14:05 merkaba kernel: [   28.962055]  xhci_gen_setup+0x1f9/0x510 [xhci_hcd]
Dec 19 14:14:05 merkaba kernel: [   28.962115]  xhci_pci_setup+0x4d/0x110 [xhci_pci]
Dec 19 14:14:05 merkaba kernel: [   28.962181]  usb_add_hcd+0x2bf/0x8a0 [usbcore]
Dec 19 14:14:05 merkaba kernel: [   28.962245]  usb_hcd_pci_probe+0x271/0x470 [usbcore]
Dec 19 14:14:05 merkaba kernel: [   28.962302]  xhci_pci_probe+0x27/0x1e8 [xhci_pci]
Dec 19 14:14:05 merkaba kernel: [   28.962361]  local_pci_probe+0x42/0xa0
Dec 19 14:14:05 merkaba kernel: [   28.962418]  ? pci_assign_irq+0x27/0x130
Dec 19 14:14:05 merkaba kernel: [   28.962474]  pci_device_probe+0x146/0x1b0
Dec 19 14:14:05 merkaba kernel: [   28.962532]  driver_probe_device+0x2fa/0x470
Dec 19 14:14:05 merkaba kernel: [   28.962590]  __driver_attach+0xdc/0x100
Dec 19 14:14:05 merkaba kernel: [   28.962646]  ? driver_probe_device+0x470/0x470
Dec 19 14:14:05 merkaba kernel: [   28.962704]  bus_for_each_dev+0x76/0xc0
Dec 19 14:14:05 merkaba kernel: [   28.962761]  ? klist_add_tail+0x3b/0x70
Dec 19 14:14:05 merkaba kernel: [   28.962819]  bus_add_driver+0x161/0x260
Dec 19 14:14:05 merkaba kernel: [   28.962875]  ? 0xffffffffc02a2000
Dec 19 14:14:05 merkaba kernel: [   28.962931]  driver_register+0x5b/0xe0
Dec 19 14:14:05 merkaba kernel: [   28.962986]  ? 0xffffffffc02a2000
Dec 19 14:14:05 merkaba kernel: [   28.963043]  do_one_initcall+0x46/0x1c8
Dec 19 14:14:05 merkaba kernel: [   28.963100]  ? free_unref_page_commit+0x95/0x120
Dec 19 14:14:05 merkaba kernel: [   28.963159]  ? _cond_resched+0x15/0x40
Dec 19 14:14:05 merkaba kernel: [   28.963217]  ? kmem_cache_alloc_trace+0xb5/0x1c0
Dec 19 14:14:05 merkaba kernel: [   28.963276]  ? do_init_module+0x22/0x201
Dec 19 14:14:05 merkaba kernel: [   28.963332]  do_init_module+0x5b/0x201
Dec 19 14:14:05 merkaba kernel: [   28.963389]  load_module.constprop.56+0x1649/0x1d80
Dec 19 14:14:05 merkaba kernel: [   28.963448]  ? vfs_read+0x113/0x130
Dec 19 14:14:05 merkaba kernel: [   28.963504]  ? vfs_read+0x113/0x130
Dec 19 14:14:05 merkaba kernel: [   28.963560]  ? __do_sys_finit_module+0xe9/0x110
Dec 19 14:14:05 merkaba kernel: [   28.963616]  __do_sys_finit_module+0xe9/0x110
Dec 19 14:14:05 merkaba kernel: [   28.963675]  do_syscall_64+0x55/0x110
Dec 19 14:14:05 merkaba kernel: [   28.963731]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Dec 19 14:14:05 merkaba kernel: [   28.963791] RIP: 0033:0x7f5b909212c9
Dec 19 14:14:05 merkaba kernel: [   28.963846] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 6b 0c 00 f7 d8 64 89 01 48 
Dec 19 14:14:05 merkaba kernel: [   28.963966] RSP: 002b:00007ffd76878708 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Dec 19 14:14:05 merkaba kernel: [   28.964039] RAX: ffffffffffffffda RBX: 000055aaf98bef70 RCX: 00007f5b909212c9
Dec 19 14:14:05 merkaba kernel: [   28.964101] RDX: 0000000000000000 RSI: 00007f5b90825cad RDI: 000000000000000d
Dec 19 14:14:05 merkaba kernel: [   28.964162] RBP: 00007f5b90825cad R08: 0000000000000000 R09: 0000000000000000
Dec 19 14:14:05 merkaba kernel: [   28.964224] R10: 000000000000000d R11: 0000000000000246 R12: 0000000000000000
Dec 19 14:14:05 merkaba kernel: [   28.964285] R13: 000055aaf98b3ac0 R14: 0000000000020000 R15: 000055aaf98bef70
Dec 19 14:14:05 merkaba kernel: [   28.964350] INFO: rcu_sched detected stalls on CPUs/tasks:
Dec 19 14:14:05 merkaba kernel: [   28.964523]  0-....: (5250 ticks this GP) idle=7d2/1/4611686018427387904 softirq=302/302 fqs=2239 
Dec 19 14:14:05 merkaba kernel: [   28.964755]  (detected by 3, t=5252 jiffies, g=-220, c=-221, q=2531)
Dec 19 14:14:05 merkaba kernel: [   28.964924] Sending NMI from CPU 3 to CPUs 0:
Dec 19 14:14:05 merkaba kernel: [   28.965166] NMI backtrace for cpu 0
Dec 19 14:14:05 merkaba kernel: [   28.965167] CPU: 0 PID: 119 Comm: systemd-udevd Not tainted 4.18.0-3-amd64 #1 Debian 4.18.20-2
Dec 19 14:14:05 merkaba kernel: [   28.965167] Hardware name: LENOVO 42433WG/42433WG, BIOS 8AET69WW (1.49 ) 06/14/2018
Dec 19 14:14:05 merkaba kernel: [   28.965168] RIP: 0010:xhci_reset+0x75/0x180 [xhci_hcd]
Dec 19 14:14:05 merkaba kernel: [   28.965168] Code: d3 00 00 00 4c 8b 65 18 bb 80 96 98 00 eb 17 a8 02 74 3f bf c7 10 00 00 e8 e8 d4 4b ea 83 eb 01 0f 84 dc 00 00 00 41 8b 04 24 <83> f8 ff 75 e0 b8 ed ff ff ff 5b 5d 41 5c c3 48 8b 07 48 c7 c6 f0 
Dec 19 14:14:05 merkaba kernel: [   28.965178] RSP: 0018:ffffb37601e87a58 EFLAGS: 00000212
Dec 19 14:14:05 merkaba kernel: [   28.965179] RAX: 0000000000000002 RBX: 000000000051f1ef RCX: 00000021e9fa04e7
Dec 19 14:14:05 merkaba kernel: [   28.965179] RDX: 00000000000009c4 RSI: 0000000000000000 RDI: 00000000000009a9
Dec 19 14:14:05 merkaba kernel: [   28.965180] RBP: ffff9c15850d2230 R08: 0000000000000001 R09: ffffb37601e87a94
Dec 19 14:14:05 merkaba kernel: [   28.965180] R10: 0000000000000000 R11: ffff9c1584c825e4 R12: ffffb37601da4020
Dec 19 14:14:05 merkaba kernel: [   28.965181] R13: ffffffffc029d2d0 R14: ffff9c15850d2230 R15: ffff9c15850d2000
Dec 19 14:14:05 merkaba kernel: [   28.965181] FS:  00007f5b8febb8c0(0000) GS:ffff9c159e200000(0000) knlGS:0000000000000000
Dec 19 14:14:05 merkaba kernel: [   28.965181] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 19 14:14:05 merkaba kernel: [   28.965182] CR2: 00007f5b8febaa85 CR3: 000000040537a001 CR4: 00000000000606f0
Dec 19 14:14:05 merkaba kernel: [   28.965182] Call Trace:
Dec 19 14:14:05 merkaba kernel: [   28.965182]  xhci_gen_setup+0x1f9/0x510 [xhci_hcd]
Dec 19 14:14:05 merkaba kernel: [   28.965183]  xhci_pci_setup+0x4d/0x110 [xhci_pci]
Dec 19 14:14:05 merkaba kernel: [   28.965183]  usb_add_hcd+0x2bf/0x8a0 [usbcore]
Dec 19 14:14:05 merkaba kernel: [   28.965183]  usb_hcd_pci_probe+0x271/0x470 [usbcore]
Dec 19 14:14:05 merkaba kernel: [   28.965184]  xhci_pci_probe+0x27/0x1e8 [xhci_pci]
Dec 19 14:14:05 merkaba kernel: [   28.965184]  local_pci_probe+0x42/0xa0
Dec 19 14:14:05 merkaba kernel: [   28.965184]  ? pci_assign_irq+0x27/0x130
Dec 19 14:14:05 merkaba kernel: [   28.965184]  pci_device_probe+0x146/0x1b0
Dec 19 14:14:05 merkaba kernel: [   28.965185]  driver_probe_device+0x2fa/0x470
Dec 19 14:14:05 merkaba kernel: [   28.965185]  __driver_attach+0xdc/0x100
Dec 19 14:14:05 merkaba kernel: [   28.965185]  ? driver_probe_device+0x470/0x470
Dec 19 14:14:05 merkaba kernel: [   28.965186]  bus_for_each_dev+0x76/0xc0
Dec 19 14:14:05 merkaba kernel: [   28.965186]  ? klist_add_tail+0x3b/0x70
Dec 19 14:14:05 merkaba kernel: [   28.965186]  bus_add_driver+0x161/0x260
Dec 19 14:14:05 merkaba kernel: [   28.965186]  ? 0xffffffffc02a2000
Dec 19 14:14:05 merkaba kernel: [   28.965187]  driver_register+0x5b/0xe0
Dec 19 14:14:05 merkaba kernel: [   28.965187]  ? 0xffffffffc02a2000
Dec 19 14:14:05 merkaba kernel: [   28.965187]  do_one_initcall+0x46/0x1c8
Dec 19 14:14:05 merkaba kernel: [   28.965187]  ? free_unref_page_commit+0x95/0x120
Dec 19 14:14:05 merkaba kernel: [   28.965188]  ? _cond_resched+0x15/0x40
Dec 19 14:14:05 merkaba kernel: [   28.965188]  ? kmem_cache_alloc_trace+0xb5/0x1c0
Dec 19 14:14:05 merkaba kernel: [   28.965188]  ? do_init_module+0x22/0x201
Dec 19 14:14:05 merkaba kernel: [   28.965189]  do_init_module+0x5b/0x201
Dec 19 14:14:05 merkaba kernel: [   28.965189]  load_module.constprop.56+0x1649/0x1d80
Dec 19 14:14:05 merkaba kernel: [   28.965189]  ? vfs_read+0x113/0x130
Dec 19 14:14:05 merkaba kernel: [   28.965189]  ? vfs_read+0x113/0x130
Dec 19 14:14:05 merkaba kernel: [   28.965190]  ? __do_sys_finit_module+0xe9/0x110
Dec 19 14:14:05 merkaba kernel: [   28.965190]  do_syscall_64+0x55/0x110
Dec 19 14:14:05 merkaba kernel: [   28.965191]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Dec 19 14:14:05 merkaba kernel: [   28.965191] RIP: 0033:0x7f5b909212c9
Dec 19 14:14:05 merkaba kernel: [   28.965191] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 6b 0c 00 f7 d8 64 89 01 48 
Dec 19 14:14:05 merkaba kernel: [   28.965201] RSP: 002b:00007ffd76878708 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Dec 19 14:14:05 merkaba kernel: [   28.965202] RAX: ffffffffffffffda RBX: 000055aaf98bef70 RCX: 00007f5b909212c9
Dec 19 14:14:05 merkaba kernel: [   28.965202] RDX: 0000000000000000 RSI: 00007f5b90825cad RDI: 000000000000000d
Dec 19 14:14:05 merkaba kernel: [   28.965203] RBP: 00007f5b90825cad R08: 0000000000000000 R09: 0000000000000000
Dec 19 14:14:05 merkaba kernel: [   28.965203] R10: 000000000000000d R11: 0000000000000246 R12: 0000000000000000
Dec 19 14:14:05 merkaba kernel: [   28.965204] R13: 000055aaf98b3ac0 R14: 0000000000020000 R15: 000055aaf98bef70
Dec 19 14:14:05 merkaba kernel: [   53.387489] xhci_hcd 0000:05:00.0: can't setup: -110
Dec 19 14:14:05 merkaba kernel: [   53.387558] xhci_hcd 0000:05:00.0: USB bus 2 deregistered
Dec 19 14:14:05 merkaba kernel: [   53.387662] ehci-pci 0000:00:1d.0: EHCI Host Controller
Dec 19 14:14:05 merkaba kernel: [   53.387695] xhci_hcd 0000:05:00.0: init 0000:05:00.0 fail, -110
Dec 19 14:14:05 merkaba kernel: [   53.387731] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2

Card just broken?
Comment 12 Martin Steigerwald 2018-12-20 21:51:01 UTC
I do not know what is different now, but it now worked with an external USB 3 harddisk and then also with the USB 2 USB stick I initially tested *out of the box* on *both* ports.
Comment 13 Andrew Kroll 2018-12-20 22:45:03 UTC
Yeah, I've noticed even with the suggestions I made, sometimes the card seems to disappear from the PCIe buss. It acts like as if you are pulling out a laptop card, but mine isn't on a laptop. Go figure.

Perhaps there is some sort of PCIe setting that needs to be overridden, like a timing or something.
Comment 14 Andrew Kroll 2018-12-20 22:57:49 UTC
Here's another set of notes... I'm using older kernel, because I have to for now.

3.18.44 #1 SMP PREEMPT Tue Oct 25 05:02:38 EDT 2016 i686 AMD Phenom(tm) II X4 945 Processor AuthenticAMD GNU/Linux

Here is what lspci -vv shows for it, in the event that the information may be useful.


03:00.0 USB Controller: Renesas Technology Corp. Device 0015 (rev 02) (prog-if 30)
        Subsystem: Renesas Technology Corp. Device 0015
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 17
        Region 0: Memory at feafe000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
                Vector table: BAR=0 offset=00001000
                PBA: BAR=0 offset=00001080
        Capabilities: [a0] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 unlimited
                        ClockPM+ Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB
        Capabilities: [100] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [150] #18
        Kernel driver in use: xhci_hcd
Comment 15 Frederik Carlier 2020-01-08 20:48:00 UTC
I have been fighting the uPD720202 controller for the past couple of weeks. I'm on Ubuntu 19.10, and have tried with different kernel versions ranging from 4.9 to 5.3.

I've read a lot of issue reports, and so far there appear to be at least two different set of problems (though probably more):

* uPD720202 controllers without ROM
* uPD720202 controllers not working when IOMMU is enabled

uPD720202 controllers without ROM
---------------------------------

There are variants of the uPD720202 which need a firmware in order to work as they do not have support to load the firmware from an external ROM.

They fail to load with these error message, similar to what Martin Steigerwald reported in #10:

[    5.116990] xhci_hcd 0000:45:00.0: new USB bus registered ...
[   32.335215] xhci_hcd 0000:45:00.0: can't setup: -110
[   32.340179] xhci_hcd 0000:45:00.0: USB bus 2 deregistered
[   32.345587] xhci_hcd 0000:45:00.0: init 0000:45:00.0 fail, -110
[   32.351496] xhci_hcd: probe of 0000:45:00.0 failed with error -110

The good news is that there is a patchset for this; see https://patchwork.kernel.org/patch/11229647/ and https://linuxlists.cc/l/1/linux-kernel/t/3362147/(patch_v5_0_4)_usb:_xhci:_add_support_for_renesas_usb_controllers#post3362147.

Alternatively, there are also user-space utilities which you can use to upload firmware to these controllers: https://github.com/markusj/upd72020x-load and http://billauer.co.il/blog/2015/11/renesas-rom-setpci/ .

I'd think at least some of you on this thread are in this scenario.

uPD720202 controllers not working when IOMMU is enabled
-------------------------------------------------------

In my case, the computer is a HP z820 workstation and there are 4 controllers, all on a single StarTech PEXUSB3S44V PCI card.

What I've noticed is that the card _works_ when IOMMU is disabled; and stops working a soon as I set the iommu=on or intel_iommu=on kernel parameters.

I'm singling out IOMMU because there's specific code in xhci.c (https://github.com/torvalds/linux/blob/07c4b9e9f71aa4bc74009f710fc5a745e10981bf/drivers/usb/host/xhci.c#L228-L286) with is triggered only if IOMMU is enabled.

I'll try to add detailed dmesg output tomorrow; but I was wondering if anyone else on this thread sees the same behavior: card working with IOMMU disabled, and not working with IOMMU enabled?
Comment 16 Frederik Carlier 2020-01-09 10:33:25 UTC
Here's my dmesg output, for one specific controller.

What stands out to me is the message "Zeroing 64bit base registers, expecting fault", but it appears fault itself is never caught.

[    0.000000] Linux version 5.3.0-26-generic (buildd@lgw01-amd64-013) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 (Ubuntu 5.3.0-26.28-generic 5.3.13)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-26-generic root=UUID=5a2de8d4-c939-455e-a42a-ca47f2c6afd3 ro intel_iommu=on
...
[    1.552333] pci 0000:0a:00.0: [1912:0015] type 00 class 0x0c0330
[    1.552373] pci 0000:0a:00.0: reg 0x10: [mem 0xde200000-0xde201fff 64bit]
[    1.552526] pci 0000:0a:00.0: PME# supported from D0 D3hot
[    1.662045] pci 0000:0a:00.0: enabling device (0100 -> 0102)
[    1.782290] pci 0000:0a:00.0: Adding to iommu group 26
[    2.167453] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.169240] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 7
[    2.171103] xhci_hcd 0000:0a:00.0: Zeroing 64bit base registers, expecting fault
[    2.302945] xhci_hcd 0000:0a:00.0: hcc params 0x014051c7 hci version 0x100 quirks 0x0000000100004090
[    2.315027] usb usb7: SerialNumber: 0000:0a:00.0
[    2.320998] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.322878] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 8
[    2.324801] xhci_hcd 0000:0a:00.0: Host supports USB 3.0 SuperSpeed
[    2.326735] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.328666] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.03
[    2.330566] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.332435] usb usb8: Product: xHCI Host Controller
[    2.334282] usb usb8: Manufacturer: Linux 5.3.0-26-generic xhci-hcd
[    2.336133] usb usb8: SerialNumber: 0000:0a:00.0
[    2.617557] xhci_hcd 0000:0a:00.0: WARNING: Host System Error
[   17.753608] xhci_hcd 0000:0a:00.0: Abort failed to stop command ring: -110
[   17.755728] xhci_hcd 0000:0a:00.0: xHCI host controller not responding, assume dead
[   17.757818] xhci_hcd 0000:0a:00.0: HC died; cleaning up
[   17.759881] xhci_hcd 0000:0a:00.0: Error while assigning device slot ID
[   17.761892] xhci_hcd 0000:0a:00.0: Max number of devices this xHCI host supports is 32.
[   17.763907] usb usb8-port1: couldn't allocate usb_device

And here's the sudo lspci -vv -d 1912: output:

0a:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02) (prog-if 30 [XHCI])
        Subsystem: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 27
        NUMA node: 0
        Region 0: Memory at de200000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
                Vector table: BAR=0 offset=00001000
                PBA: BAR=0 offset=00001080
        Capabilities: [a0] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 1024 bytes
                DevSta: CorrErr+ NonFatalErr+ FatalErr- UnsupReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 unlimited
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Not Supported
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO+ CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [140 v1] Device Serial Number 13-00-00-00-92-43-14-08
        Capabilities: [150 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Kernel driver in use: xhci_hcd
Comment 17 Frederik Carlier 2020-01-09 10:34:08 UTC
Created attachment 286707 [details]
Full dmesg output with iommu=on
Comment 18 Frederik Carlier 2020-01-09 10:46:19 UTC
And here's dmesg output for the _same system_, with IOMMU disabled:

[    0.000000] Linux version 5.3.0-26-generic (buildd@lgw01-amd64-013) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 (Ubuntu 5.3.0-26.28-generic 5.3.13)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-26-generic root=UUID=5a2de8d4-c939-455e-a42a-ca47f2c6afd3 ro
...
[    1.559661] pci 0000:0a:00.0: [1912:0015] type 00 class 0x0c0330
[    1.559702] pci 0000:0a:00.0: reg 0x10: [mem 0xde200000-0xde201fff 64bit]
[    1.559854] pci 0000:0a:00.0: PME# supported from D0 D3hot
[    1.662077] pci 0000:0a:00.0: enabling device (0100 -> 0102)
[    2.136199] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.137995] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 7
[    2.253739] xhci_hcd 0000:0a:00.0: hcc params 0x014051c7 hci version 0x100 quirks 0x0000000100004090
[    2.265434] usb usb7: SerialNumber: 0000:0a:00.0
[    2.271276] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.273086] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 8
[    2.274946] xhci_hcd 0000:0a:00.0: Host supports USB 3.0 SuperSpeed
[    2.276839] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.278768] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.03
[    2.280687] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.282599] usb usb8: Product: xHCI Host Controller
[    2.284447] usb usb8: Manufacturer: Linux 5.3.0-26-generic xhci-hcd
[    2.286281] usb usb8: SerialNumber: 0000:0a:00.0

and the corresponding lspci output:

0a:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02) (prog-if 30 [XHCI])
        Subsystem: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 27
        NUMA node: 0
        Region 0: Memory at de200000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
                Vector table: BAR=0 offset=00001000
                PBA: BAR=0 offset=00001080
        Capabilities: [a0] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 1024 bytes
                DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 unlimited
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Not Supported
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [140 v1] Device Serial Number 13-00-00-00-92-43-14-08
        Capabilities: [150 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Kernel driver in use: xhci_hcd
Comment 19 Frederik Carlier 2020-01-09 10:48:15 UTC
Created attachment 286713 [details]
Full dmesg output without iommu
Comment 20 Frederik Carlier 2020-01-13 12:19:31 UTC
And, to be complete, here's output with the dyndbg='module xhci_hcd +p' kernel parameter:

[    2.294942] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.296727] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 7
[    2.298584] xhci_hcd 0000:0a:00.0: QUIRK: Resetting on resume
[    2.298585] xhci_hcd 0000:0a:00.0: // Halt the HC
[    2.298593] xhci_hcd 0000:0a:00.0: Zeroing 64bit base registers, expecting fault
[    2.316502] xhci_hcd 0000:0a:00.0: Resetting HCD
[    2.316522] xhci_hcd 0000:0a:00.0: // Reset the HC
[    2.430367] xhci_hcd 0000:0a:00.0: Wait for controller to be ready for doorbell rings
[    2.430377] xhci_hcd 0000:0a:00.0: Reset complete
[    2.430396] xhci_hcd 0000:0a:00.0: Enabling 64-bit DMA addresses.
[    2.430405] xhci_hcd 0000:0a:00.0: Calling HCD init
[    2.430406] xhci_hcd 0000:0a:00.0: xhci_init
[    2.430408] xhci_hcd 0000:0a:00.0: xHCI doesn't need link TRB QUIRK
[    2.430410] xhci_hcd 0000:0a:00.0: Supported page size register = 0x1
[    2.430411] xhci_hcd 0000:0a:00.0: Supported page size of 4K
[    2.430412] xhci_hcd 0000:0a:00.0: HCD page size set to 4K
[    2.430414] xhci_hcd 0000:0a:00.0: // xHC can handle at most 32 device slots.
[    2.430416] xhci_hcd 0000:0a:00.0: // Setting Max device slots reg = 0x20.
[    2.430439] xhci_hcd 0000:0a:00.0: // Device context base array address = 0xfffff000 (DMA), (____ptrval____) (virt)
[    2.430444] xhci_hcd 0000:0a:00.0: Allocated command ring at (____ptrval____)
[    2.430445] xhci_hcd 0000:0a:00.0: First segment DMA is 0xffffe000
[    2.430449] xhci_hcd 0000:0a:00.0: // Setting command ring address to 0x00000000ffffe001
[    2.430453] xhci_hcd 0000:0a:00.0: // Doorbell array is located at offset 0x800 from cap regs base addr
[    2.430454] xhci_hcd 0000:0a:00.0: // Allocating event ring
[    2.430458] xhci_hcd 0000:0a:00.0: TRB math tests passed.
[    2.430462] xhci_hcd 0000:0a:00.0: // Write ERST size = 1 to ir_set 0 (some bits preserved)
[    2.430463] xhci_hcd 0000:0a:00.0: // Set ERST entries to point to event ring.
[    2.430464] xhci_hcd 0000:0a:00.0: // Set ERST base address for ir_set 0 = 0xffffb000
[    2.430470] xhci_hcd 0000:0a:00.0: // Write event ring dequeue pointer, preserving EHB bit
[    2.430472] xhci_hcd 0000:0a:00.0: Wrote ERST address to ir_set 0.
[    2.430473] xhci_hcd 0000:0a:00.0: Allocating 4 scratchpad buffers
[    2.430495] xhci_hcd 0000:0a:00.0: Ext Cap (____ptrval____), port offset = 1, count = 1, revision = 0x3
[    2.430500] xhci_hcd 0000:0a:00.0: Ext Cap (____ptrval____), port offset = 3, count = 1, revision = 0x2
[    2.430505] xhci_hcd 0000:0a:00.0: Found 1 USB 2.0 ports and 1 USB 3.0 ports.
[    2.430507] xhci_hcd 0000:0a:00.0: Finished xhci_init
[    2.430509] xhci_hcd 0000:0a:00.0: Compliance mode recovery timer initialized
[    2.430510] xhci_hcd 0000:0a:00.0: Called HCD init
[    2.430511] xhci_hcd 0000:0a:00.0: hcc params 0x014051c7 hci version 0x100 quirks 0x0000000100004090
[    2.434174] xhci_hcd 0000:0a:00.0: xhci_run
[    2.434181] xhci_hcd 0000:0a:00.0: Failed to enable MSI-X
[    2.434182] xhci_hcd 0000:0a:00.0: failed to allocate MSI entry
[    2.434201] xhci_hcd 0000:0a:00.0: ERST deq = 64'hffffc000
[    2.434203] xhci_hcd 0000:0a:00.0: // Set the interrupt modulation register
[    2.434209] xhci_hcd 0000:0a:00.0: // Enable interrupts, cmd = 0x4.
[    2.434213] xhci_hcd 0000:0a:00.0: // Enabling event ring interrupter (____ptrval____) by writing 0x2 to irq_pending
[    2.434214] xhci_hcd 0000:0a:00.0: Finished xhci_run for USB2 roothub
[    2.447527] xhci_hcd 0000:0a:00.0: set port power 7-1 ON, portsc: 0x202e1
[    2.447620] xhci_hcd 0000:0a:00.0: xHCI Host Controller
[    2.449456] xhci_hcd 0000:0a:00.0: new USB bus registered, assigned bus number 8
[    2.451342] xhci_hcd 0000:0a:00.0: Host supports USB 3.0 SuperSpeed
[    2.455084] xhci_hcd 0000:0a:00.0: // Turn on HC, cmd = 0x5.
[    2.455099] xhci_hcd 0000:0a:00.0: Finished xhci_run for USB3 roothub
[    2.455174] xhci_hcd 0000:0a:00.0: Port change event, 8-1, id 1, portsc: 0x21203
[    2.457040] xhci_hcd 0000:0a:00.0: handle_port_status: starting port polling.
[    2.457046] xhci_hcd 0000:0a:00.0: Port change event, 7-1, id 3, portsc: 0x202e1
[    2.457048] xhci_hcd 0000:0a:00.0: handle_port_status: starting port polling.
[    2.470216] xhci_hcd 0000:0a:00.0: set port power 8-1 ON, portsc: 0x21203
[    2.550013] xhci_hcd 0000:0a:00.0: Get port status 7-1 read: 0x202e1, return 0x10101
[    2.551935] xhci_hcd 0000:0a:00.0: clear port1 connect change, portsc: 0x2e1
[    2.575002] xhci_hcd 0000:0a:00.0: All USB3 ports have entered U0 already!
[    2.575004] xhci_hcd 0000:0a:00.0: Compliance Mode Recovery Timer Deleted.
[    2.575006] xhci_hcd 0000:0a:00.0: Get port status 8-1 read: 0x21203, return 0x10203
[    2.575053] xhci_hcd 0000:0a:00.0: clear port1 connect change, portsc: 0x1203
[    2.653604] xhci_hcd 0000:0a:00.0: xhci_hub_status_data: stopping port polling.
[    2.657283] xhci_hcd 0000:0a:00.0: xhci_hub_status_data: stopping port polling.
[    2.659195] xhci_hcd 0000:0a:00.0: Get port status 7-1 read: 0x2e1, return 0x101
[    2.660960] xhci_hcd 0000:0a:00.0: // Ding dong!
[    2.661573] xhci_hcd 0000:0a:00.0: xhci_hub_status_data: stopping port polling.
[    2.662738] xhci_hcd 0000:0a:00.0: Slot 1 output ctx = 0xffff5000 (dma)
[    2.662742] xhci_hcd 0000:0a:00.0: Slot 1 input ctx = 0xffff4000 (dma)
[    2.662749] xhci_hcd 0000:0a:00.0: Set slot id 1 dcbaa entry (____ptrval____) to 0xffff5000
[    2.662773] xhci_hcd 0000:0a:00.0: set port reset, actual port 0 status  = 0x331
[    2.677728] xhci_hcd 0000:0a:00.0: Get port status 8-1 read: 0x1203, return 0x203
[    2.677739] xhci_hcd 0000:0a:00.0: // Ding dong!
[    2.685578] xhci_hcd 0000:0a:00.0: xhci_hub_status_data: stopping port polling.
[    2.688595] xhci_hcd 0000:0a:00.0: Slot 2 output ctx = 0xffff1000 (dma)
[    2.688601] xhci_hcd 0000:0a:00.0: Slot 2 input ctx = 0xffff0000 (dma)
[    2.688608] xhci_hcd 0000:0a:00.0: Set slot id 2 dcbaa entry (____ptrval____) to 0xffff1000
[    2.729584] xhci_hcd 0000:0a:00.0: Get port status 7-1 read: 0x200e03, return 0x100503
[    2.731299] xhci_hcd 0000:0a:00.0: clear port1 reset change, portsc: 0xe03
[    2.795236] xhci_hcd 0000:0a:00.0: Set root hub portnum to 3
[    2.795237] xhci_hcd 0000:0a:00.0: Set fake root hub portnum to 1
[    2.795239] xhci_hcd 0000:0a:00.0: udev->tt = (____ptrval____)
[    2.795240] xhci_hcd 0000:0a:00.0: udev->ttport = 0x0
[    2.795244] xhci_hcd 0000:0a:00.0: // Ding dong!
[    7.889675] xhci_hcd 0000:0a:00.0: Command timeout
[    7.889677] xhci_hcd 0000:0a:00.0: Abort command ring
[   12.889684] xhci_hcd 0000:0a:00.0: Abort failed to stop command ring: -110
[   12.889882] xhci_hcd 0000:0a:00.0: // Halt the HC
[   12.889888] xhci_hcd 0000:0a:00.0: xHCI host controller not responding, assume dead
[   12.890482] xhci_hcd 0000:0a:00.0: Killing URBs for slot ID 1, ep index 0
[   12.890484] xhci_hcd 0000:0a:00.0: Killing URBs for slot ID 2, ep index 0
[   12.890486] xhci_hcd 0000:0a:00.0: HC died; cleaning up
[   12.891178] xhci_hcd 0000:0a:00.0: Timeout while waiting for setup device command
[   12.893267] xhci_hcd 0000:0a:00.0: xHCI dying or halted, can't queue_command
[   12.893268] xhci_hcd 0000:0a:00.0: FIXME: allocate a command ring segment
[   12.894021] xhci_hcd 0000:0a:00.0: Bad real port.
[   12.894023] xhci_hcd 0000:0a:00.0: xHCI dying or halted, can't queue_command
[   12.894024] xhci_hcd 0000:0a:00.0: FIXME: allocate a command ring segment
Comment 21 Lars W. 2020-04-30 16:48:14 UTC
Still same issue with 5.4 LTS kernel series
Comment 22 Lars W. 2020-05-05 07:18:28 UTC
I wonder if this chip would work if the Renesas firmware loader patch from https://lore.kernel.org/patchwork/patch/686290/ would have been merged into the kernel (maybe together with adding the firmware file to linux-firmware package).
Comment 23 Carlo Wood 2020-05-18 16:49:49 UTC
Hello fellow sufferers,

I too have the StarTech PEXUSB3S44V PCI card like Frederik.
Note that StarTech dropped support for linux many years ago, I should never have bought this expensive card and discourage anyone else to buy it.

That being said, I really wish I could it to work :/.
It DID work a lot better when I used it on a different mobo and
using ubuntu. But recently moved it to an AORUS master modo that
runs ArchLinux; and now it is totally dead.

I tried the echo 0 msi trick, but then I get the same errors as Martin (https://bugzilla.kernel.org/show_bug.cgi?id=199627#c10).

Did any find a definite way to get this card to work yet?
Comment 24 Marcus Mönius 2020-06-27 14:20:10 UTC
kernel 5.7.2-arch1-1 Arch Linux
With the above kernel version the card works, when plug it in before booting. If I insert the card when the system is running, then it does not work. My USB drive doesn't show up and the mouse lags then. When inserted before booting it works properly and the USB drive is recognized.
Comment 25 Carlo Wood 2020-06-27 17:06:58 UTC
Marcus, unless you're in the habbit of plugging in PCI-express cards into live machines, I don't think we're talking about the same thing. Surprisingly enough, I tried rebooting too; it didn't make a difference.

If you are aware of a kernel patch specific to fix a bug in this driver that is in that kernel version, please let me know and I'll retest things.
Comment 26 Marcus Mönius 2020-06-27 18:45:09 UTC
Sorry, I meant my ExpressCard doesn't work when being hot-plugged, but works when inserted before booting.
Comment 27 Manfred 2020-10-10 11:52:29 UTC
(In reply to Marcus Mönius from comment #26)
> Sorry, I meant my ExpressCard doesn't work when being hot-plugged, but works
> when inserted before booting.

Some hours ago this morning, I came across hints that this shoule be due to the power management on the "Express" side.

Disabling that, the problems were repoted as disappeared.

HTH.
Comment 28 Martin Steigerwald 2020-10-10 12:44:25 UTC
Dear Manfred, thanks for your hint. How would I disable the power management on the "express" side? Is it that PCIe ASPM stuff or where in the amazing labyrinth that is called sysfs would I look?
Comment 29 Manfred 2020-10-10 14:30:11 UTC
Quick re-search: e.g.

 [ https://bbs.archlinux.org/viewtopic.php?pid=1840845#p1840845 ]
Comment 30 Martin Steigerwald 2020-10-10 14:34:40 UTC
Ah, you mean a BIOS setting. I was not aware of that. Thank you.
Comment 31 Manfred 2020-10-10 14:57:40 UTC
One more hint:

 [ https://bbs.archlinux.org/viewtopic.php?pid=1925250#p1925250 ]
Comment 32 Manfred 2020-10-10 15:05:42 UTC
Delock specifies 

. . .  "Linux Kernel 4.9.4 or above"

for

. . . 90387 -->  VIA VL805

as well as

. . . 90394 -->  Renesas uPD720202
Comment 33 Martin Steigerwald 2020-10-10 15:40:40 UTC
Manfred, disabling power management for PCI express card seems to have helped here on a ThinkPad T520. The card I have appears to work with both ports even after a suspend to RAM and a suspend to disk cycle and also directly after boot.

I did not try to unplug and plug it again, as

1) the laptop or kernel does not seem to like this. I got jerky mouse movements as I inserted the card.

2) It is difficult with that specific card cause it is mechanically quite difficult to remove.

So I will just keep it plugged and see how it fares.

I got a CSL-Computer USB 3.0 Super Speed PCMCIA Express Card with this controller:

05:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)

However I do not see a note about a missing firmware although I do not have upd72020x-fw on my computer and with apt-file I also do not find a package that contains it.
Comment 34 Manfred 2020-10-10 15:57:39 UTC
Glad to hear.

Take care:

. . . Not every Express slot is really prepared to be
. . . (un-)loaded while being powered on.

I *always* (un-)plugged my modules in my still running T60 (from 2007)
*only* when completely shut down / powered off.
And *always* used the eject button.
Never got a complaint 'til today :-)
Comment 35 Andrew J. Kroll 2020-10-10 17:55:38 UTC
My reports have been with PCI card on desktop.
Just thought I would clarify.
Comment 36 Manfred 2020-10-10 19:15:07 UTC
(In reply to Andrew J. Kroll from comment #35)

Unfortunately, quite a few bugs become 'hi-jacked' by 'near-line' observations.
Comment 37 Andrew J. Kroll 2020-10-11 04:07:15 UTC
Not a problem, it's all PCI. :-) The point is that you can't normally yank a PCI card and expect a PC to not start on fire.

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