#asahi-dev · 2023-02-22 15:38
mazman, TB is soooo much fun! :D#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:34
jannaunot sure how it works with the extended PCIe config space, dumped via lspci -xxxx#asahi-dev · 2023-02-22 15:33
jannauit seems to parse lspci -x, shouldn't be hard to replicate#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-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:20
Glanzmannc#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 15:16
Glanzmannjannau: I tested on macos m1 air and compared to a amd64 with a kingston usb stick and get the same numbers, so yes your speedtest is valid: https://pbot.rmdir.de/dGb3Mf4-BvsrQ2IA7gM5xw#asahi-dev · 2023-02-22 14:45
mazjannau: the cost of userspace drivers?#asahi-dev · 2023-02-22 14:04
jannauwith the x2 enclosure it is 1.5 vs. 1.2 GB/s#asahi-dev · 2023-02-22 14:03
jannauwith the x4 nvme it's 2.8 GB/s vs. 1.9 GB/s#asahi-dev · 2023-02-22 14:01
jannauthe thunderbolt nvmes are considerably slower on macos. more than I would attribute to macos is bad compared to linux#asahi-dev · 2023-02-22 13:59
jannaudoes someone know if `dd bs=8M if=/dev/rdiskN of=/dev/null` is a valid sequential read spped test on macos?#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:33
jannauwith the device enabled I read all 0xffffffff in the HV#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:07
jannauI'm still confused by the serror in the HV when reading the BAR, the nvme should be powered#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:25
jannau23.5gbps netto. samsung nvme doesn't work with titan ridge either. so running out of easy tests#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 12:07
jannausven: "Timing buffered disk reads: 8824 MB in 3.00 seconds = 2941.07 MB/sec" with a Titan Ridge based nvme enclosure with a PCIev3 x4 link#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#asahi-dev · 2023-02-22 09:07
bluetail5sven CalDigit... ? I had the tb4 model and under macOS, I had this dock, trying to run 4 ssds in raid 0 (stripeset). And when I then benchmarked the drive, I got an immediate kernel panic and the system rebooted. Not to mention - that unit was running super hot.#asahi-dev · 2023-02-22 09:05
svenoh, or maybe we need some of those hidden tunables lina found for the gpu for atc and apciec as well#asahi-dev · 2023-02-22 09:04
svenotherwise I think tracing what macos does to the pcie MMIO and the config space and comparing to linux might uncover another magic bit#asahi-dev · 2023-02-22 09:03
sveni have some local code that applies the tunables from linux in the correct sequence now but i'm not sure that'll help#asahi-dev · 2023-02-22 08:45
jannaureproducible with the samsung 970 evo (sans Plus, afaik just different nand) from my thinkpad#asahi-dev · 2023-02-22 08:43
jannausven: it's 100% with the samsung nvme both connected directly and through the dock. #asahi-dev · 2023-02-22 08:12
svenmaybe in like 1 out of 10-15 connections#asahi-dev · 2023-02-22 08:12
svenjannau: huh, so if I connect my usb4 hub to my half-broken caldigit dock to my working caldigit dock I think I can very rarely reproduce that "entire BAR reads as -1" issue on the xhci controller in the second dock#asahi-dev · 2023-02-22 08:06
bluetail5can you ask for an update?#asahi-dev · 2023-02-21 16:46
linaI sent it a month ago, got a reply 3 days later, replied to that and after that nothing...#asahi-dev · 2023-02-21 16:46
linaI think I might be getting the DART2 treatment from Robin for my UAT patch... ;;#asahi-dev · 2023-02-21 16:30
jannauthe samsung ssd issue looks like a device issue. pci resource allocation is identical with the working nvme#asahi-dev · 2023-02-21 16:26
svenI think those might only fix a rescan issue I had though