Opened 8 years ago

Last modified 5 years ago

#12885 closed bug

XHCI page fault under skylake — at Version 11

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: Drivers/USB/XHCI Version: R1/Development
Keywords: skylake ryzen xhci usb-c usb Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by kallisti5)

This issue generally occurs when booting from a USB 3 flash drive.

_ZN4XHCIC2EP8pci_infoP5Stack() -> XHCI::XHCI(pci_info*, Stack*)
_ZN4XHCI5AddToEP5Stack ()      -> XHCI::AddTo(Stack*)
_ZN5StackC1Ev ()               -> Stack::Stack()

This line seems to be a core issue in syslog:

usb xhci -1: using message signaled interrupts
usb xhci -1: stating XHCI host controller
usb hub 2: hub supports more ports than we do (18 vs. 16)
usb xhci -1: successfully started the controller

Change History (19)

by kallisti5, 8 years ago

Attachment: 1.jpg added

by kallisti5, 8 years ago

Attachment: 2.jpg added

by kallisti5, 8 years ago

Attachment: 3.jpg added

by kallisti5, 8 years ago

Attachment: 4.jpg added

comment:1 by kallisti5, 8 years ago

(at boot from USB 2.0 stick plugged into USB 3.1 socket. hrev50452 x86_64)

comment:2 by kallisti5, 8 years ago

Tested hrev50454, issue still exists w/no changes.

comment:3 by korli, 8 years ago

Weird, it is as if there were a second XHCI controller to initialize (the first is started, an allocation for a second controller is being done while KDLed).

comment:4 by kallisti5, 8 years ago

Only one USB controller via linux:

$ sudo lspci -s 00:14.0 -nnn -vv
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) (prog-if 30 [XHCI])
	Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller [1028:0704]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 122
	Region 0: Memory at dc210000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [70] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
		Address: 00000000fee00238  Data: 0000
	Kernel driver in use: xhci_hcd

lsusb:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:5682 Realtek Semiconductor Corp. 
Bus 001 Device 003: ID 04f3:20d0 Elan Microelectronics Corp. 
Bus 001 Device 002: ID 8087:0a2a Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg:

$ dmesg | grep -i xhci
[    1.195032] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.195037] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    1.196210] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00109810
[    1.196215] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    1.196299] usb usb1: Product: xHCI Host Controller
[    1.196301] usb usb1: Manufacturer: Linux 4.4.0-31-generic xhci-hcd
[    1.203786] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.203790] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    1.203817] usb usb2: Product: xHCI Host Controller
[    1.203819] usb usb2: Manufacturer: Linux 4.4.0-31-generic xhci-hcd
[    1.568146] usb 1-3: new full-speed USB device number 2 using xhci_hcd
[    1.920337] usb 1-4: new full-speed USB device number 3 using xhci_hcd
[    2.272169] usb 1-5: new high-speed USB device number 4 using xhci_hcd

comment:5 by kallisti5, 8 years ago

interestingly:

kallisti5@ares ~ :) $ cat /sys/bus/usb/devices/usb1/product 
xHCI Host Controller
kallisti5@ares ~ :) $ cat /sys/bus/usb/devices/usb2/product 
xHCI Host Controller
 lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 3: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 3: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 5: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 5: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M

comment:6 by korli, 8 years ago

Just a guess, it could be that the USB 2.0 stick comes in the last port of the hub, and because we use then the next out of bound index here. You could try to increase the value USB_MAX_PORT_COUNT to 32 for instance, and see what happens. (the lsusb output doesn't list the usb2 stick, so it's not clear what happens).

comment:7 by kallisti5, 8 years ago

The logs not showing that error already had the max USB hub count bumped to 24. Same error appeared (minus the error about 16 vs 18)

comment:8 by kallisti5, 8 years ago

bus 02 appears to be the USB C port and everything external. (USB 3.1) Bus 01 seems to be an internal bus operating at USB 2.0 speeds.

So this looks like a USB host controller that supports more than one bus? I wonder if EHCI did that.

in reply to:  8 comment:9 by korli, 8 years ago

Replying to kallisti5:

So this looks like a USB host controller that supports more than one bus? I wonder if EHCI did that.

No, the XHCI Linux driver chooses to expose two root hubs (2.0 and 3.x), each port is present on both hubs. If a USB2 device is connected, it appears on the 2.0 root hub, otherwise on the 3.x root hub.

It might help if you could try with TRACE_USB enabled.

by kallisti5, 8 years ago

Attachment: XHCI-BACKTRACE.jpg added

backtrace from USB 3 flash drive

by kallisti5, 8 years ago

Attachment: XHCI-TRACE-LOG.jpg added

XHCI Log output with tracing enabled

comment:10 by korli, 8 years ago

Owner: changed from korli to nobody
Status: newassigned

by kallisti5, 7 years ago

Attachment: IMG_20161027_092549.jpg added

KDL BT - hrev50621, x86_64, Sky Lake, USB 3.0

by kallisti5, 7 years ago

Attachment: IMG_20161027_092648.jpg added

syslog - hrev50621, x86_64, Sky Lake, USB 3.0

comment:11 by kallisti5, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.