#
…

2023-02-20

00:48kesslerd has quit [Remote host closed the connection]
00:51pthariensflame has joined #asahi-dev
00:52kesslerd has joined #asahi-dev
00:53pthariensflame has quit []
01:59opticron has quit [Ping timeout: 480 seconds]
02:12opticron has joined #asahi-dev
02:40zef has joined #asahi-dev
02:47zef_ has quit [Ping timeout: 480 seconds]
03:31roxfan has joined #asahi-dev
03:32roxfan2 has quit [Ping timeout: 480 seconds]
04:21djorz has quit [Ping timeout: 480 seconds]
04:53pbsds has quit [Ping timeout: 480 seconds]
05:06DarkShadow4444 has joined #asahi-dev
05:11DarkShadow44 has quit [Ping timeout: 480 seconds]
05:22pbsds has joined #asahi-dev
05:26seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:27seeeath has joined #asahi-dev
05:43seeeath has quit [Read error: Connection reset by peer]
06:17gladiac has joined #asahi-dev
07:29jeffmiw has quit [Ping timeout: 480 seconds]
07:42tom-w has joined #asahi-dev
07:52Dementor has quit [Read error: Connection reset by peer]
07:52Dementor has joined #asahi-dev
08:58pjakobsson has joined #asahi-dev
09:33apalos has joined #asahi-dev
09:35MajorBiscuit has joined #asahi-dev
09:42kesslerd has quit [Remote host closed the connection]
09:42kesslerd has joined #asahi-dev
09:48MajorBiscuit has quit [Quit: WeeChat 3.6]
10:21tobhe_ has quit [Quit: leaving]
10:21tobhe has joined #asahi-dev
10:43gladiac has quit [Quit: k thx bye]
10:55bisko has joined #asahi-dev
11:04chadmed has quit [Remote host closed the connection]
11:08chadmed has joined #asahi-dev
11:15kesslerd has quit [Quit: Leaving]
11:20kesslerd has joined #asahi-dev
11:36apalos has quit [Quit: ZNC 1.7.2 - https://znc.in]
11:37apalos has joined #asahi-dev
11:39hightower2 has quit [Ping timeout: 480 seconds]
11:43apalos has quit [Quit: ZNC 1.7.2 - https://znc.in]
11:45apalos has joined #asahi-dev
11:54jannausven: tb seems to work for the most part. connected to the thunderbolt4 hub (goshen ridge) with i225 pcie ethernet and alpine ridge nvme case (directly and through a downstream port on the hub)
11:55jannauI can't get the nvme to work however
11:55svenhmm… nvme should just be tunneled pcie as well
11:56sveni also can’t get my usb4 hub (goshen ridge) to work twice without manually doing a full pcie reset inbetween
11:56jannauthe device is visible in lspci and the kernel detects a nvme device but it ends with
11:57jannaunvme 0000:03:00.0: enabling device (0000 -> 0002)
11:57svenuh. that sounds like it should work :/
11:57svenmaybe enable nvme debug as well? but I’d expect to see an error
11:57jannauthere is however no nvme block device
11:58jannauyes, I think replugging the hub requires a reset and sometimes results in the M3 failed to boot
11:59svenI haven't seen the M3 boot failure ever :/
11:59svenand I have a rather ugly hack locally that performs a PMGR pcie reset every time the tunnel is brought down
11:59sventhat at least fixes the hub being recognized more than once
12:03svenalso needs resets = <&ps_atc1_pcie>; in the DT
12:03jannauwe also have to fix bolt on asahi linux (or there's a problem with my kernel config). it doesn't display the host controller. boltd log shows some dmidecode errors. sounds like it might need to learn that thunderbolt is not x86/acpi specific
12:03svenhotplug 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
12:06hightower2 has joined #asahi-dev
12:15jannauI suspect the M3 boot failure happens when disconnecting the cable at the wrong time
12:17jannaus/when/after/
12:24svenhm.. wouldn't surprise me
12:24sveni need to improve the error handling there anyway
12:24svenright now it probably gets stuck in a broken state when anything goes wrong
12:30svenjannau: briefly looked into bolt, it seems to also assume that the NHI is a PCI device afaict
12:34jannauI assumed it shows the host controller for since you asked for `boltctl list -a`
12:36svenhuh, boltctl list -a should show the host
12:36svenat least it used to
12:37jannauit does so on my thinkpad but not on the mac mini
12:38svenhrm, maybe I broke that somehow :/
12:38svenOHHH....
12:38sveni know what happened I think
12:38svenit's when I moved the nhi to that child device node as a hack
12:38svenbut that node doesn't contain that "apple,thunderbolt-drom" property
12:43svenadd a ->parent to the line that defines dev inside tb_drom_copy_property and it'll work again.
12:44svenI'll fix that once I clean up that entire hack anyway
12:46jannauseems to be only a cosmetical problem anyway
12:47svenit's mostly related to the awkward child node hack required due to that DART
12:48svenmaybe 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
12:53veloek has joined #asahi-dev
13:06beeblebrox has joined #asahi-dev
13:12cylm has quit [Ping timeout: 480 seconds]
13:24hightower2 has quit [Ping timeout: 480 seconds]
13:37jannauthunderbolt nvme probing fails on "if (readl(dev->bar + NVME_REG_CSTS) == -1) {" in nvme_pci_enable()
13:39svencan you check PORT_PREFMEM_ENABLE from the hv?
13:39svenmaybe that thing was reset again for some reason
13:43Dementor2 has joined #asahi-dev
13:46Dementor has quit [Ping timeout: 480 seconds]
13:46Dementor2 is now known as Dementor
13:49jannauseems to be 0. should I be able to write to it from the hv? writes don't seem to stick
13:49svenhmmm… maybe you can’t read it back
13:50svenmaybe trt writing 1 and then rescanning the nvme device
13:53jannauno change
13:53svencan you check the bar from the hv?
13:53svendoes it only read back as -1?
13:53svenand can you also show lspci -vv?
14:04svenRegion 0: Memory at 600100000 (64-bit, non-prefetchable) [size=16K]
14:04svenhrm, that should work anyway
14:15jannauhow do I check the bar from the HV?
14:16svenread from 0x600100000 :D
14:18jannauthat doesn't work at all
14:18svenoh.. maybe because the device is disabled :/
14:20jannauappears so, I can read from enabled pcie usb hcd but not from the disbaled wlan adapter
14:21svenand I guess that nvme device works on other Linux machines and on macOS
14:22svenstrange. it sounds like its BAR always returns -1 which should only happen if the device isn’t connected or in a low power state
14:23bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:35jannauintel nvme works: "Timing buffered disk reads: 4300 MB in 3.00 seconds = 1432.78 MB/sec"
14:35svenis that fast enough?
14:36sven40 gbps should be faster, shouldn't it?
14:36sven(even accounting for overhead)
14:36jannauprobably: "pci 0000:03:00.0: 8.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x4 link at 0000:01:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)"
14:37jannaui.e. it's only using PCIe1 x4
14:37jannauerr probably not
14:39jannauit's faster than the same ssd with a 10 gbps usb3 link though
14:42svencan you test it with another host?
14:43svenid really like to know if lane bonding and 20gbps/lane just works
14:49jannauit's faster than on my intel thinkpad with Alpine Ridge tbt controller: 1070 MB/sec
14:50jannaudd reports just 1.2 GB/s (intel) instead of 1.5 GB/s (mac) with a block size of 8M
14:50jannausame PCIe bandwidth message
14:55svennice :D
14:56jannausamsung ssd is not faster on the intel system but it should be capable of ~3500 MB/s
14:57svensamsung is the one where the BAR reads as -1?
14:58shunsukemie has joined #asahi-dev
14:58shunsukemie has left #asahi-dev [#asahi-dev]
14:58bisko has joined #asahi-dev
14:58shunsuke has joined #asahi-dev
14:58sveni guess you could try to trace everything macos does to pcie but that's not much fun
14:59sveneven less fun is tracing the NHI messages on the rings becase I've been too lazy to write a proper tracer so far
15:00jannauthe intel ssd should be good for 2000 MB/s. so there might be an issue with the enclosure
15:01bluetail986 has quit []
15:11kesslerd has quit [Remote host closed the connection]
15:15svendoes hotplug work on your usb4 hub btw?
15:16svenbecause the ports on mine usually seem to miss the hotplug irq
15:16svenand sometimes they are delayed by like 10-15 seconds
15:17svenuh oh.. and now lockdep just complained about a possible deadlock in pciehp 🙃
15:17jannauhaven't tried that yet as hotplug is not relieable in general
15:18jannausometimes it doesn't work at all, sometimes it takes a long time and sometimes it get into hotplug hot-unplug loop
15:19sventhat's for hotplug at the ports on the usb4 hub, right?
15:19kesslerd has joined #asahi-dev
15:19sventhe nhi side seems to work rather reliably here
15:19jannauno, for hotplug on the mac port
15:19svenit's just that pcie side that seems to not get the hotplug irq
15:19svenah, okay
15:20sventhat's mostly stable for me fwiw
15:36zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
15:39jannauhotplug on the dock/hub's downstream port appears to be relieable. 10 out of 10 tries
15:40jannaualso hotplug of the dock worked on on the first try
15:40jannaussd is slower hwen connected through the dock though, 1 GB/s instead of 1.5 GB/s
15:43nela has quit [Ping timeout: 480 seconds]
15:43svenhuh, weird. hotplug on the hub's downstream port is very unreliable here
15:44sventhe pcie hotplug driver essentially seems to miss irqs
15:52nela has joined #asahi-dev
15:52jannausysfs reports that the nvme runs with a PCIe v3 x2 link. so 1.5 GB/s seems to be ok/expected
15:54svenhrm, if i switch pciehp to polling mode it actually works reliably as well
15:54svenso it's really just the irq that somehow gets lost
16:01jannausigh, this seems to be ok as the enclosure is only a 20gbps / x2 thunderbolt 3 device
16:02gladiac has joined #asahi-dev
16:07ah- has quit [Read error: Connection reset by peer]
16:07bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:11bluetail986 has joined #asahi-dev
16:13ah- has joined #asahi-dev
16:23svenstill can’t reproduce that m3 issue despite trying to remove the cable at various times and/or replugging it very quickly
16:24kesslerd has quit [Remote host closed the connection]
16:25kesslerd has joined #asahi-dev
16:25zzywysm has joined #asahi-dev
16:49svenjannau: which usb4 huh do you have?
16:49shunsuke has quit [Ping timeout: 480 seconds]
16:49svenI assume it’s what I guess is the 1-to-3 goshen ridge reference design?
16:54jannauno, I have dock with 1 thunderbolt downstream port: hp thunderbolt dock g4
16:58jannaumain selling point was the integrated 2.5gbps nic
16:59svenahhh… okay, the downstream port of my caldigit ts3 also works quite well
16:59svenit’s just that usb4 hub that has issues
17:00shunsuke has joined #asahi-dev
17:02jannauthe thunderbolt controller is the same though
17:28svenjust pushed that reset hack and slightly better error handling
17:36Esmil_ has quit []
17:37Esmil has joined #asahi-dev
17:47shunsuke has quit [Ping timeout: 480 seconds]
17:55shunsuke has joined #asahi-dev
18:04gladiac is now known as Guest5413
18:04gladiac has joined #asahi-dev
18:04bluetail986 has quit []
18:04bluetail has joined #asahi-dev
18:10Guest5413 has quit [Ping timeout: 480 seconds]
18:13shunsuke has quit [Ping timeout: 480 seconds]
18:21shunsuke has joined #asahi-dev
18:29shunsuke has quit [Ping timeout: 480 seconds]
18:42svenlol, caldigit ts3 to owc hub to Apple Thunderbolt Display doesn’t work because the Linux pci code messes up the resource distribution afaict :D
18:43svenbut it looks like the hotplug interrupts work when the hub isn’t directly connected to the host :/
18:54shunsuke has joined #asahi-dev
19:00nyilas has joined #asahi-dev
19:02shunsuke has quit [Ping timeout: 480 seconds]
19:12svencan’t find anything special in the usb4 spec about interrupts either
19:12sveni sure hope this is not another weird vendor specific bit that has to be set somewhere
19:26shunsuke has joined #asahi-dev
19:34shunsuke has quit [Ping timeout: 480 seconds]
19:59shunsuke has joined #asahi-dev
20:04jannauusb3 ports on my thunderbolt3 (titan ridge) work. do you understand how usb3 tunneling is supposed to work?
20:06svenI understand the dwc3 part
20:07svenbut it doesn’t work currently, if you plug in a usb4 devices that Supports tunneling the nhi code will complain that the tunnel couldn’t be activated
20:07sveneither because dwc3 is currently in a messed up state or because more vendor specific nhi stuff is missing
20:08shunsuke has quit [Ping timeout: 480 seconds]
20:08sveni hope it’s the former because I really don’t want to write a nhi tracer
20:10jannauyes, it fails to activate the tunnel. I wasn't 100% certain that tunnel terminates at dwc3
20:14sveni'm reasonably sure it's just this here on the dwc3 side: PIPEHANDLER_MUX_CTRL = 0x11 (MUX_MODE=1(DUMMY_PHY), CLK_SELECT=2(DUMMY_PHY))
20:14sven(ignore the dummy_phy, that name is wrong)
20:15jannaubtw, I see for for the root port and the thunderbolt bridges in the dock "BAR 13: no space for [io size 0x1000/0x3000]
20:19svenI think that's expected. it comes from some heuristic somewhere that allocates N bytes of io space when a bridge is marked as hotplug capable
20:23gladiac has quit [Quit: k thx bye]
20:29cylm has joined #asahi-dev
20:33shunsuke has joined #asahi-dev
20:37svenoh well, just flipping the pipehandler mux to the usb3 tunnel phy isn’t enough to make it work
20:40jeffmiw has joined #asahi-dev
20:43shunsuke has quit [Ping timeout: 480 seconds]
20:44kesslerd has quit [Quit: Leaving]
20:51jannauthe pcie ethernet adapter is mostly busted. I shouldn't have assumed that it works just because config via dhcp works
20:57djorz has joined #asahi-dev
20:58svenhrm, all of my devices work fine fwiw
21:04sventhose are tg3 ethernet, various xhci controllers, that old ohci/ehci controller pair in the tbt display, some intel(?) Ethernet controller and presumably also that old pcie to FireWire Controller but I don’t have anything to test that
21:06yamii_ has joined #asahi-dev
21:06yamii has quit [Read error: Connection reset by peer]
21:09shunsuke has joined #asahi-dev
21:17shunsuke has quit [Ping timeout: 480 seconds]
21:17kesslerd has joined #asahi-dev
21:20nyilas has quit [Quit: Konversation terminated!]
21:29kesslerd has quit [Remote host closed the connection]
21:35shunsuke has joined #asahi-dev
21:42jannauthis kind of broken: "408 bytes from 192.169.1.10: icmp_seq=183 ttl=64 time=541905 ms"
21:43kesslerd has joined #asahi-dev
21:44jannaunot even sure if that is correct, high packet loss, out of order and duplicate replies as well
21:46svenhuh.. that sounds pretty broken
21:47svenI also really wouldn’t expect a Ethernet adapter to do anything weird with pcie :/
22:41hightower2 has joined #asahi-dev
23:01darkapex has quit [Remote host closed the connection]
23:02darkapex has joined #asahi-dev
…