#
✕ nick:sven
#asahi-dev · 2023-02-20 15:19
sventhe nhi side seems to work rather reliably here
#asahi-dev · 2023-02-20 15:19
sventhat's for hotplug at the ports on the usb4 hub, right?
#asahi-dev · 2023-02-20 15:18
svenok
#asahi-dev · 2023-02-20 15:17
svenuh oh.. and now lockdep just complained about a possible deadlock in pciehp 🙃
#asahi-dev · 2023-02-20 15:16
svenand sometimes they are delayed by like 10-15 seconds
#asahi-dev · 2023-02-20 15:16
svenbecause the ports on mine usually seem to miss the hotplug irq
#asahi-dev · 2023-02-20 15:15
svendoes hotplug work on your usb4 hub btw?
#asahi-dev · 2023-02-20 14:59
sveneven less fun is tracing the NHI messages on the rings becase I've been too lazy to write a proper tracer so far
#asahi-dev · 2023-02-20 14:58
sveni guess you could try to trace everything macos does to pcie but that's not much fun
#asahi-dev · 2023-02-20 14:58
svenhmmmm
#asahi-dev · 2023-02-20 14:57
svensamsung is the one where the BAR reads as -1?
#asahi-dev · 2023-02-20 14:55
svennice :D
#asahi-dev · 2023-02-20 14:43
svenid really like to know if lane bonding and 20gbps/lane just works
#asahi-dev · 2023-02-20 14:42
svencan you test it with another host?
#asahi-dev · 2023-02-20 14:36
sven(even accounting for overhead)
#asahi-dev · 2023-02-20 14:36
sven40 gbps should be faster, shouldn't it?
#asahi-dev · 2023-02-20 14:35
svenis that fast enough?
#asahi-dev · 2023-02-20 14:22
svenstrange. it sounds like its BAR always returns -1 which should only happen if the device isn’t connected or in a low power state
#asahi-dev · 2023-02-20 14:21
svenand I guess that nvme device works on other Linux machines and on macOS
#asahi-dev · 2023-02-20 14:18
svenoh.. maybe because the device is disabled :/
#asahi-dev · 2023-02-20 14:18
svenhuh
#asahi-dev · 2023-02-20 14:16
svenread from 0x600100000 :D
#asahi-dev · 2023-02-20 14:04
svenhrm, that should work anyway
#asahi-dev · 2023-02-20 14:04
svenRegion 0: Memory at 600100000 (64-bit, non-prefetchable) [size=16K]
#asahi-dev · 2023-02-20 13:53
svenand can you also show lspci -vv?
#asahi-dev · 2023-02-20 13:53
svendoes it only read back as -1?
#asahi-dev · 2023-02-20 13:53
svencan you check the bar from the hv?
#asahi-dev · 2023-02-20 13:50
svenmaybe trt writing 1 and then rescanning the nvme device
#asahi-dev · 2023-02-20 13:49
svenhmmm… maybe you can’t read it back
#asahi-dev · 2023-02-20 13:39
svenmaybe that thing was reset again for some reason
#asahi-dev · 2023-02-20 13:39
svencan you check PORT_PREFMEM_ENABLE from the hv?
#asahi-dev · 2023-02-20 12:48
sven+a
#asahi-dev · 2023-02-20 12:48
svenmaybe something like "apple,usb4-coprocessor" parent node that contains the dart and the "apple,usb4-nhi" node as a child with the actual regs, interrupts, etc. assigned to the child works better
#asahi-dev · 2023-02-20 12:47
svenit's mostly related to the awkward child node hack required due to that DART
#asahi-dev · 2023-02-20 12:47
svenyeah
#asahi-dev · 2023-02-20 12:44
svenI'll fix that once I clean up that entire hack anyway
#asahi-dev · 2023-02-20 12:43
svenadd a ->parent to the line that defines dev inside tb_drom_copy_property and it'll work again.
#asahi-dev · 2023-02-20 12:38
svenbut that node doesn't contain that "apple,thunderbolt-drom" property
#asahi-dev · 2023-02-20 12:38
svenit's when I moved the nhi to that child device node as a hack
#asahi-dev · 2023-02-20 12:38
sveni know what happened I think
#asahi-dev · 2023-02-20 12:38
svenOHHH....
#asahi-dev · 2023-02-20 12:38
svenhrm, maybe I broke that somehow :/
#asahi-dev · 2023-02-20 12:36
svenat least it used to
#asahi-dev · 2023-02-20 12:36
svenhuh, boltctl list -a should show the host
#asahi-dev · 2023-02-20 12:30
svenjannau: briefly looked into bolt, it seems to also assume that the NHI is a PCI device afaict
#asahi-dev · 2023-02-20 12:24
svenright now it probably gets stuck in a broken state when anything goes wrong
#asahi-dev · 2023-02-20 12:24
sveni need to improve the error handling there anyway
#asahi-dev · 2023-02-20 12:24
svenhm.. wouldn't surprise me
#asahi-dev · 2023-02-20 12:03
svenhotplug into the hub is also kinda sketchy. i'm not sure if that's a general PCI hotplug issue or something I messed up in pcie-apple though
#asahi-dev · 2023-02-20 12:03
svenfun

plus ›