Gentoo Archives: gentoo-user

From: "Håkon Alstadheim" <hakon@×××××××××××××××.no>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Flaky USB 3.0 -- typo-fix -- more logs
Date: Tue, 08 Sep 2015 10:49:39
Message-Id: 55EEBD30.6080801@alstadheim.priv.no
In Reply to: Re: [gentoo-user] Flaky USB 3.0 -- typo-fix by "Håkon Alstadheim"
1 Den 07. sep. 2015 21:23, skrev Håkon Alstadheim:
2 > Den 07. sep. 2015 20:26, skrev Håkon Alstadheim:
3 >> In a nutshell:
4 >> My PCIE USB 3.0 card keeps quitting, eg. no light from my laser mouse.
5 >> No life in anything I plug in.
6 >> Lately I've had three cold starts (that usually will revive the thing) ,
7 >> but still no go. Will try unplugging for a couple of minutes next time I
8 >> am able to reboot.
9 Did a reboot and tried wiggling some knobs in the bios. Noticed the
10 mouse lit up while I was in there, but it goes out at once when boot
11 starts. :/ .
12 Got a dmesg output from gentoo on the bare metal:
13
14 0:gentoo ~ # echo 1 > /sys/bus/pci/devices/0000:04:00.0/remove
15 0:gentoo ~ # dmesg -c
16 0:gentoo ~ # echo 1 > /sys/bus/pci/rescan
17 0:gentoo ~ # dmesg -c
18 [ 863.007306] pci 0000:04:00.0: [1106:3483] type 00 class 0x0c0330
19 [ 863.007331] pci 0000:04:00.0: reg 0x10: [mem 0xc6500000-0xc6500fff 64bit]
20 [ 863.007450] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
21 [ 863.007739] dmar: [Firmware Bug]: RMRR entry for device 04:00.0 is
22 broken - applying workaround
23 [ 863.018667] pci 0000:04:00.0: BAR 0: assigned [mem
24 0xc6500000-0xc6500fff 64bit]
25 [ 863.018682] ast 0000:0c:00.0: BAR 6: [??? 0x00000000 flags 0x2] has
26 bogus alignment
27 [ 863.034924] pci 0000:04:00.0: xHCI HW did not halt within 16000 usec
28 status = 0x1004
29 [ 863.035127] xhci_hcd 0000:04:00.0: xHCI Host Controller
30 [ 863.035138] xhci_hcd 0000:04:00.0: new USB bus registered, assigned
31 bus number 7
32 [ 863.059990] xhci_hcd 0000:04:00.0: Host not halted after 16000
33 microseconds.
34 [ 863.059994] xhci_hcd 0000:04:00.0: can't setup: -110
35 [ 863.059998] xhci_hcd 0000:04:00.0: USB bus 7 deregistered
36 [ 863.060057] xhci_hcd 0000:04:00.0: init 0000:04:00.0 fail, -110
37 [ 863.060063] xhci_hcd: probe of 0000:04:00.0 failed with error -110
38
39 ---
40 Now I have got to stop fiddling with this box, need to keep it up 24/7
41 for at least a week now before I try anything drastic again : - ~
42 ---
43
44 >> General note about the commands and switches below: Most have been found
45 >> by trial and error, and the setup used may be utterly WRONG. If you spot
46 >> any mistakes, please point them out to me.
47 >>
48 >> Googling around led me to run then following, with the output seen
49 >> below. Similar output can be seen right after boot.
50 >>
51 >> ------------
52 >> root@steam:~# echo 1 > /sys/bus/pci/devices/0000:00:05.0/remove
53 >> root@steam:~# dmesg -c
54 >> root@steam:~# echo "1" > /sys/bus/pci/rescan
55 >> root@steam:~# dmesg -c
56 >> [ 3164.999480] pci 0000:00:05.0: [1106:3483] type 00 class 0x0c0330
57 >> [ 3165.008397] pci 0000:00:05.0: reg 0x10: [mem 0xf42a4000-0xf42a4fff 64bit]
58 >> [ 3165.051792] pci 0000:00:05.0: BAR 0: assigned [mem
59 >> 0xf4000000-0xf4000fff 64bit]
60 >> [ 3165.059245] pci 0000:00:05.0: can't find IRQ for PCI INT A; probably
61 >> buggy MP table
62 >> [ 3165.075349] pci 0000:00:05.0: xHCI HW did not halt within 16000 usec
63 >> status = 0x1004
64 >> [ 3165.075961] xhci_hcd 0000:00:05.0: can't find IRQ for PCI INT A;
65 >> probably buggy MP table
66 >> [ 3165.076150] xhci_hcd 0000:00:05.0: xHCI Host Controller
67 >> [ 3165.076157] xhci_hcd 0000:00:05.0: new USB bus registered, assigned
68 >> bus number 1
69 >> [ 3165.100651] xhci_hcd 0000:00:05.0: Host not halted after 16000
70 >> microseconds.
71 >> [ 3165.100653] xhci_hcd 0000:00:05.0: can't setup: -110
72 >> [ 3165.100655] xhci_hcd 0000:00:05.0: USB bus 1 deregistered
73 >> [ 3165.100774] xhci_hcd 0000:00:05.0: init 0000:00:05.0 fail, -110
74 >> [ 3165.100776] xhci_hcd: probe of 0000:00:05.0 failed with error -110
75 >> -----------------------
76 >>
77 >> This happens on Asus hardware viz:
78 >>
79 >> -------------
80 >> # smbios-sys-info
81 >> Libsmbios version: 2.2.28
82 >> Product Name: Z10PE-D8 WS
83 >> Vendor: ASUSTeK COMPUTER INC.
84 >> BIOS Version: 1001
85 >> -------------
86 >> On top of this I'm running Xen, viz:
87 >> 0:gentoo ~ # xl info
88 >> host : gentoo
89 >> release : 4.0.9-gentoo
90 >> version : #1 SMP Tue Sep 1 01:10:52 CEST 2015
91 >> machine : x86_64
92 >> ...
93 >> cpu_mhz : 2394
94 >> hw_caps :
95 >> bfebfbff:2c100800:00000000:00007f00:77fefbff:00000000:00000021:000037ab
96 >> virt_caps : hvm hvm_directio
97 >> ...
98 >> xen_version : 4.5.1
99 >> xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
100 >> hvm-3.0-x86_32p hvm-3.0-x86_64
101 >> ...
102 >> xen_commandline : ssd-xen-g-4-00-marker loglvl=warn
103 >> guest_loglvl=warn noreboot iommu=1,verbose iommu_inclusive_mapping=1
104 >> com1=115200,8n1 console=com1 dom0_max_vcpus=4 dom0_vcpus_pin=1
105 >> dom0_mem=8G,max:8G cpufreq=xen,performance,verbose tmem=1
106 >> dom0_nodes=0,relaxed sched_smt_power_savings=1
107 >> cc_compiler : x86_64-pc-linux-gnu-gcc (Gentoo 4.9.3 p1.2,
108 >> pie-0.6.3) 4.9.3
109 >> cc_compile_by :
110 >> cc_compile_domain : alstadheim.priv.no
111 >> cc_compile_date : Mon Aug 31 05:54:06 CEST 2015
112 >> xend_config_format : 4
113 >> --------------
114 > Corrected: My gcc-version is x86_64-pc-linux-gnu-4.9.3
115 >> --------------
116 >> Dom 0 is:
117 >> # uname -a
118 >> Linux gentoo 4.0.9-gentoo #1 SMP Tue Sep 1 01:10:52 CEST 2015 x86_64
119 >> Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz GenuineIntel GNU/Linux
120 >> --------------
121 >> # cat /proc/cmdline
122 >> placeholder root=LABEL=ssdroot ro
123 >> xen-pciback.hide=(00:1b.0)(02:00.0)(04:00.0)(81:00.0)(82:00.0)(09:00.0)
124 >> console=hvc0 console=vga domodules domdadm dolvm intel_iommu=on
125 >> earlyprintk=xen usbip_core.usbip_debug_flag=0 usbcore.autosuspend=-1
126 >> ----------
127 >> The USB card in question is:
128 >> root@steam:~# lspci -vvv -s 0000:00:05.0
129 >> 00:05.0 USB controller: VIA Technologies, Inc. Device 3483 (rev 01)
130 >> (prog-if 30 [XHCI])
131 >> Subsystem: VIA Technologies, Inc. Device 3483
132 >> Physical Slot: 5
133 >> Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
134 >> Stepping- SERR- FastB2B- DisINTx-
135 >> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
136 >> <TAbort- <MAbort- >SERR- <PERR- INTx-
137 >> Interrupt: pin A routed to IRQ 10
138 >> Region 0: Memory at f4000000 (64-bit, non-prefetchable) [size=4K]
139 >> Capabilities: [80] Power Management version 3
140 >> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
141 >> PME(D0-,D1-,D2-,D3hot-,D3cold-)
142 >> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
143 >> Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
144 >> Address: 0000000000000000 Data: 0000
145 >> Capabilities: [c4] Express (v2) Endpoint, MSI 00
146 >> DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns,
147 >> L1 <1us
148 >> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
149 >> DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
150 >> Unsupported-
151 >> RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
152 >> MaxPayload 128 bytes, MaxReadReq 512 bytes
153 >> DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+
154 >> TransPend-
155 >> LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Exit
156 >> Latency L0s <2us, L1 <16us
157 >> ClockPM+ Surprise- LLActRep- BwNot-
158 >> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
159 >> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
160 >> LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+
161 >> DLActive- BWMgmt- ABWMgmt-
162 >> DevCap2: Completion Timeout: Range B, TimeoutDis+, LTR-, OBFF
163 >> Not Supported
164 >> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-,
165 >> OBFF Disabled
166 >> LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
167 >> EqualizationPhase1-
168 >> EqualizationPhase2-, EqualizationPhase3-,
169 >> LinkEqualizationRequest-
170 >> -------------------
171 >> ... which is pased through to a debian system, SMP Debian
172 >> 3.16.7-ckt11-1+deb8u3.
173 >> The same flakyness can be observed if I try to use the card in Dom0.
174 >> ----steam.cfg-file for the DomU----
175 >> name = "steam.hvm"
176 >> builder = "hvm"
177 >> vcpus = 8
178 >> cpus="16-23"
179 >> memory = 6144
180 >> no_migrate = 1
181 >> device_model_version="qemu-xen-traditional"
182 >> disk = [ '/dev/system/steam,raw,xvda,rw',
183 >> '/dev/system/steam-swap,raw,xvdb,rw',
184 >> 'file:/usr/local/share/xen/cd-images/debian-8.1.0-amd64-netinst.iso,xvdc:cdrom,r'
185 >> ]
186 >> vif = [ 'mac=02:16:3e:00:00:08,model=e1000']
187 >> on_poweroff = 'destroy'
188 >> on_reboot = 'restart'
189 >> on_crash = 'restart'
190 >> boot = 'cd'
191 >> acpi = '1'
192 >> xen_platform_pci = '1'
193 >> sdl = '0'
194 >> vnc = '0'
195 >> serial = 'pty'
196 >> gfx_passthru=1
197 >> ---
198 >> I'v also tried with 'acpi=0'
199 >>
200 >> xen command-line to create the vm: /usr/sbin/xl create steam.hvm
201 >> pci=["04:00.0","82:00.0","00:1b.0"]
202 >> ---
203 >> I'm using "soft cpu pinning" (is that the correct term? ) so I do not
204 >> think the vcpus are being moved around at all.
205 >>
206 >> What to do ? Is there someplace other than gentoo-user better suited to
207 >> helping me getting this card working?
208 >>
209 >> I'v also tried running a Windows 8.1 vm with the same USB-card, no luck
210 >> there either, this time around. My hunch is that this is somewhat
211 >> hardware-related, but I'm hoping there is some tweak that can be done to
212 >> the card to make it more reliable. I'm seeing a lot of similar reports
213 >> while googling, but no bulletproof solutions.
214 >>
215 >> I rarely have the time to boot gentoo directly on the bare metal, so I
216 >> will not do that unless someone has very good reason to think doing so
217 >> could help find a fix that will work under Xen.
218 >>
219 >>
220 >>
221 >
222 >