#
✕ nick:sven
#asahi-dev · 2023-02-24 12:42
sventhe duct tape version is to replace dev_dbg, etc with dev_err drivers/thunderbolt/tb.h
#asahi-dev · 2023-02-24 12:40
svencan you run a kernel with thunderbolt debug out enabled?
#asahi-dev · 2023-02-24 12:40
svenyup, look like that's a thunderbolt 4 host! :)
#asahi-dev · 2023-02-24 12:39
sventhat would be helpful. essentially I'm looking for a machine with a usb4 host controller as well
#asahi-dev · 2023-02-24 12:38
svenrowanG337: is that lspci output without the hub connected?
#asahi-dev · 2023-02-24 11:36
svenmaybe wait for the dt maintainer's opinion ;)
#asahi-dev · 2023-02-24 11:35
svenwhich also isn't upstream and I'd probably have the same comment there
#asahi-dev · 2023-02-23 19:38
sventhat sound eerily similar to how my early driver development process works :D
#asahi-dev · 2023-02-23 19:29
svenif I connect my caldigit dock in front of the usb4 hub all the hotplug interrupts just work
#asahi-dev · 2023-02-23 19:29
svenhm, so the hotplug interrupt issue is clearly a usb4 thing
#asahi-dev · 2023-02-23 18:41
sven“Enable proxy mode if -v is set and if the local policy security mode is set to the most insecure level”
#asahi-dev · 2023-02-23 18:40
sventhe thing after the && checks for security level or something
#asahi-dev · 2023-02-23 18:40
svenI think that name is just misleading. it’s actually something like “verbose boot enabled” iirc
#asahi-dev · 2023-02-23 16:25
svendoes anyone here have a usb4 host running Linux and a goshen ridge usb4 hub and a few more devices?
#asahi-dev · 2023-02-23 13:28
svenat least not on t8103
#asahi-dev · 2023-02-23 13:27
svenno
#asahi-dev · 2023-02-23 13:15
svenyeah, and there's no way to use anything above 32 anyway so I don't think this actually matters
#asahi-dev · 2023-02-23 13:08
svenit ends up as 0x71 instead of 0x51, but yeah, probably a good idea to fix it
#asahi-dev · 2023-02-23 12:50
svenlooks like we write 0xfffffff1 to PORT_MSICFG because pcie->nvecs is only initialized much later
#asahi-dev · 2023-02-22 19:37
svenI guess I’ll actually have to write a proper tracer for it after all
#asahi-dev · 2023-02-22 19:36
svenhm. if it’s nothing in that port MMIO space and also nothing in the config space there’s still that NHI thing left :/
#asahi-dev · 2023-02-22 19:35
svenprobabky because there's that protocol adapter instead of the phy
#asahi-dev · 2023-02-22 19:34
sveniirc the usb4 pcie also keeps the refclk off
#asahi-dev · 2023-02-22 19:33
svendid you mean the upload that txt file? :D
#asahi-dev · 2023-02-22 17:11
svenmaybe there’s just another magic bit like the one that enables prefetchable memory somewhere
#asahi-dev · 2023-02-22 17:10
svencan you dump the port MMIO Region and compare it?
#asahi-dev · 2023-02-22 15:48
svenall those obscure bugs of undocumented pcie, thunderbolt, usb and phy hardware combined!
#asahi-dev · 2023-02-22 15:36
svenalso, lspci -xxxx seems to somehow trigger the pcie hotplug interrupt on this usb4 hub 🙃
#asahi-dev · 2023-02-22 15:35
svenbtw. the issue with that xhci controller not working was just linux bus resource allocation here (pci 0000:30:00.0: BAR 0: failed to assign [mem size 0x00008000 64bit]) and not the issue that you see with that nvme device
#asahi-dev · 2023-02-22 15:29
svenhrm... actually.. looks like it doesn't just take a raw dump :/
#asahi-dev · 2023-02-22 15:27
svenjannau: ^-- can you try to dump the pci config space when running xnu and with that nvme connected and then parse it using lspci?
#asahi-dev · 2023-02-22 15:27
sven:D
#asahi-dev · 2023-02-22 15:27
sven-F <file> Read PCI configuration dump from a given file
#asahi-dev · 2023-02-22 15:24
svenmight be interesting to see if anything suspicious shows up when running xnu
#asahi-dev · 2023-02-22 15:24
svenhmm.. I wonder if we can easily hack lspci to read from a file when it wants to read the config space
#asahi-dev · 2023-02-22 15:20
svenwouldn’t surprise if the nvme driver is just much more optimized on Linux fwiw
#asahi-dev · 2023-02-22 15:18
svenI’m not gonna complain that nvme via thunderbolt is much faster on Linux for some reason :D
#asahi-dev · 2023-02-22 13:43
svenbut no idea how to debug this :-(
#asahi-dev · 2023-02-22 13:43
svenok, so that means that BAR is inactive for sone reason
#asahi-dev · 2023-02-22 13:09
svenI think that one just flips a few bits in one config register
#asahi-dev · 2023-02-22 13:08
svenmaybe do what pci_enable_dev does manually?
#asahi-dev · 2023-02-22 13:07
svenI’ve never had a serror reading in that area as long as pcie is powered up
#asahi-dev · 2023-02-22 13:07
svenyeah, that’s also very strange
#asahi-dev · 2023-02-22 13:04
svenI’ll push what i currently have with the tunables but I doubt that makes a difference
#asahi-dev · 2023-02-22 13:03
svenfrom what I can tell my port init is very similar to what xnu does
#asahi-dev · 2023-02-22 13:02
sventhat issue still confuses me
#asahi-dev · 2023-02-22 12:10
svenshould be more than 20gbps which requires lane bonding :)
#asahi-dev · 2023-02-22 12:09
sven\o/
#asahi-dev · 2023-02-22 09:09
svenand i bet my half-broken one just has some cold solder joints on the connection between the two pcbs it seems to have
#asahi-dev · 2023-02-22 09:08
sveni have the tb3 variant and that one works quite well on both macos and linux now

plus ›