Opened 8 years ago
Last modified 6 years ago
#13046 assigned bug
Hide downstream PCI devices when not present
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | PCI hotplug | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
It seems newer skylake systems can have "hidden" PCI devices. Haiku currently iterates through all PCI devices resulting in drivers (such as XHCI) attempting to access invalid PCI devices (memory spaces return all 0xffffffff)
Attached is the lspci on linux from a small dell dongle plugged and unplugged.
Haiku sees the PCI bus like the plugged output.
Overview:
Linux, no USB C dongles:
$ lspci -tvnn -[0000:00]-+-00.0 Intel Corporation Skylake Host Bridge/DRAM Registers [8086:1904] +-02.0 Intel Corporation HD Graphics 520 [8086:1916] +-04.0 Intel Corporation Skylake Processor Thermal Subsystem [8086:1903] +-14.0 Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] +-14.2 Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] +-15.0 Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] +-15.1 Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] +-16.0 Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] +-17.0 Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] +-1c.0-[01-39]-- +-1c.4-[3a]----00.0 Intel Corporation Wireless 7265 [8086:095a] +-1c.5-[3b]----00.0 Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] +-1f.0 Intel Corporation Sunrise Point-LP LPC Controller [8086:9d48] +-1f.2 Intel Corporation Sunrise Point-LP PMC [8086:9d21] +-1f.3 Intel Corporation Sunrise Point-LP HD Audio [8086:9d70] \-1f.4 Intel Corporation Sunrise Point-LP SMBus [8086:9d23]
Linux, USB C dongle plugged in:
-[0000:00]-+-00.0 Intel Corporation Skylake Host Bridge/DRAM Registers [8086:1904] +-02.0 Intel Corporation HD Graphics 520 [8086:1916] +-04.0 Intel Corporation Skylake Processor Thermal Subsystem [8086:1903] +-14.0 Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] +-14.2 Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] +-15.0 Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] +-15.1 Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] +-16.0 Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] +-17.0 Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] +-1c.0-[01-39]----00.0-[02-39]--+-00.0-[03]-- | +-01.0-[04-38]-- | \-02.0-[39]----00.0 Intel Corporation DSL6340 USB 3.1 Controller [Alpine Ridge] [8086:15b5] +-1c.4-[3a]----00.0 Intel Corporation Wireless 7265 [8086:095a] +-1c.5-[3b]----00.0 Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] +-1f.0 Intel Corporation Sunrise Point-LP LPC Controller [8086:9d48] +-1f.2 Intel Corporation Sunrise Point-LP PMC [8086:9d21] +-1f.3 Intel Corporation Sunrise Point-LP HD Audio [8086:9d70] \-1f.4 Intel Corporation Sunrise Point-LP SMBus [8086:9d23]
Attachments (3)
Change History (13)
by , 8 years ago
Attachment: | lspci-unplugged.txt added |
---|
comment:1 by , 8 years ago
Blocking: | 12885 added |
---|
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
Well, it would be nice to provide a syslog (see ReportingBugs). It would have helped for #12885 in the first place...
comment:4 by , 8 years ago
I will as soon as someone figures out how to get syslogs from a machine that can't access it's boot device, doesn't have a serial port, and won't boot up. Until then screenshots of syslogs is the best it's gonna get. :-). Care to write an early USB serial driver that works on a broken USB bus?
comment:5 by , 8 years ago
My only thought is to leverage a thunderbolt 3 PCI enclosure and plug in a pcie serial card that presents the port like a built in port... I can try that but chances are low of it working.
comment:6 by , 8 years ago
Maybe add a "break;" at http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/busses/usb/xhci.cpp#n837 It should initialize only the first USB XHCI controller, and let the system boot up.
by , 8 years ago
Attachment: | IMG_20161102_085935.jpg added |
---|
comment:7 by , 8 years ago
I'll give the break a try. I did check the xhci interface version, if "invalid" then return. It got me past the problem, but resulted in a no boot devices issue :-| If I plug in the USB C dongle it has the same effect.
I noticed the bar flags are normally 04 *except* on those secondary PCIe devices that should be hidden... then they're 00
04 in the bar == 0100b which is "type 10b" aka 64-bit addressing. I tried the 64-bit addressing but it didn't solve the issue. (although a good addition to check for and use)
comment:8 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:9 by , 6 years ago
Blocking: | 12885 removed |
---|
comment:10 by , 6 years ago
Soo ... actually it appears Sunrise Point's root PCI controller has a particularly nasty bug which may be the real cause of this: http://xref.plausible.coop/source/xref/linux-master/drivers/pci/quirks.c#4350
We may need to implement that quirk in Haiku also.
USB C Dongle unattached - Linux