#asahi-dev · 2022-03-15 16:22
sventpw_rules: i think dmesg will show something like "new device SuperSpeed Gen 2x2"#asahi-dev · 2022-03-15 16:19
sventhe bus certainly supports up to gen 2x2#asahi-dev · 2022-03-15 16:19
sveni guess? the 3.1 is probably just a hardcoded name somewhere#asahi-dev · 2022-03-15 16:17
svenhave you macos under the m1n1 hypervisor before?#asahi-dev · 2022-03-15 16:15
sventhough i guess usb 3 gen 2 might be interesting as well just to confirm it's the same sequence as usb 3 gen 1#asahi-dev · 2022-03-15 16:15
svenah, yes, that#asahi-dev · 2022-03-15 16:07
sven*device#asahi-dev · 2022-03-15 16:07
svendoes anyone have a usb 3 gen 2 devices (i.e. something that uses both lanes here) and can also run macos in the hv?#asahi-dev · 2022-03-15 12:56
sveni still only do half of what macos does but i guess that's enough for usb 3 gen 1 at least#asahi-dev · 2022-03-15 12:53
svenlooks like it's just that stick, same model (from the same order even...): 402 MB in 2.01 seconds = 200.11 MB/sec#asahi-dev · 2022-03-15 12:50
svenTiming O_DIRECT cached reads: 148 MB in 2.02 seconds = 73.15 MB/sec <-- hrm... i wonder if this usb stick just sucks immensely or if I'm still missing some magic pokes #asahi-dev · 2022-03-15 12:08
sventl;dr: using the PORT_RESET workaround completely breaks the usb3 phy no matter what so we're back to "tear dwc3 down completely and reinit it"#asahi-dev · 2022-03-15 12:07
svenaaand with some more horribly hacks now both usb2 and usb3 hotplug works :>#asahi-dev · 2022-03-15 11:54
svenlol#asahi-dev · 2022-03-15 09:11
svenbecause that makes sense!#asahi-dev · 2022-03-15 09:11
svenand ofc usb3 -> usb2 -> usb3 hotplug also doesn't work#asahi-dev · 2022-03-15 09:10
svenlol, i hate atcphy. right now either usb3 hotplug *OR* usb2 hotplug works#asahi-dev · 2022-03-14 13:39
svenI just guessed SEP wrapped the key somehow and passed it along in that field then. but I haven't looked at this at all fwiw#asahi-dev · 2022-03-14 13:36
svenask SEP or whatever for the key and just forward it to ANS when reading/writing blocks to offload the actual encryption#asahi-dev · 2022-03-14 13:36
svenyeah, that would make sense#asahi-dev · 2022-03-14 13:35
sventhere might be additional layer of encryption macos uses with additional hw support from ANS. there are some fields inside that TCB structure related to some "aes key" that we just don't use for now#asahi-dev · 2022-03-14 11:10
svenI also still need to implement the tear down. Otherwise we’re back to “you only get to use this USB port once unless you reboot” :D#asahi-dev · 2022-03-14 11:09
svenohhh… it always seems to work in one orientation. I guess there’s still a bug in the lane swapping #asahi-dev · 2022-03-14 10:52
sven[ 6.029926] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd#asahi-dev · 2022-03-14 10:52
sven[ 6.046992] usb-storage 4-1:1.0: USB Mass Storage device detected#asahi-dev · 2022-03-14 10:52
svenspeaking of the horror that is USB, at least usb3 on the typec ports works *sometimes* now. other times it still pretends the thing is high-speed only or that the port is just broken...#asahi-dev · 2022-03-14 10:31
svennvme also seems fine#asahi-dev · 2022-03-14 10:27
sveni'm still convinced USB is a practical joke taken way too far#asahi-dev · 2022-03-13 18:02
svensoooo close#asahi-dev · 2022-03-13 18:02
sven[ 27.418742] usb 3-1: unable to get BOS descriptor or descriptor too short#asahi-dev · 2022-03-13 18:02
sven[ 24.948981] usb 3-1: new super-speed USB device number 11 using xhci-hcd#asahi-dev · 2022-03-13 12:50
sven*didn't#asahi-dev · 2022-03-13 12:50
sventhere's still a chance I just did hit that horrible state yet :D#asahi-dev · 2022-03-13 12:49
svenstill need to test this more though#asahi-dev · 2022-03-13 12:49
svencable was connected.#asahi-dev · 2022-03-13 12:49
svenno usb3 yet, but it looks like it's actually possible to make hotplug work without tearing down dwc3 and setting it back up again. I can just set the port reset bit when the cable is disconnected and clear it after a new cable has been connected. I think this resulted in horribly states last time because I just cycled the reset bit only when a new#asahi-dev · 2022-03-12 17:41
svenno guarantees about dt stability before the release except for stuff that’s been upstreamed#asahi-dev · 2022-03-12 17:38
svenand end users really shouldn’t be messing with device trees anyway#asahi-dev · 2022-03-12 17:38
svenI mean, you can always go to 1TR and go from there or just install a second “boot to usb stub”#asahi-dev · 2022-03-11 23:12
svenand that’s just for the usb2 part. I bet usb3 doesn’t work yet due to another dumb problem like that#asahi-dev · 2022-03-11 23:11
svenand 2) if a phy is connected to a port and that phy is also connected to dwc3 dwc3 won’t probe anymore (silently ofc) because it assumes an extcon connected to the phy must exist :-(#asahi-dev · 2022-03-11 23:11
svenugh… brought to you by hours of debugging: 1) when the usb2 phy is powered down the dwc3 soft reset never completes and ofc dwc3 only calls phy_power_on *after* that soft reset ofc#asahi-dev · 2022-03-11 22:28
svennice!#asahi-dev · 2022-03-11 18:00
svenI only noticed that you were working on it but didn’t realize it was done#asahi-dev · 2022-03-11 17:58
svenoh, nice!#asahi-dev · 2022-03-11 17:58
svenstill a bit annoying but no way around it#asahi-dev · 2022-03-11 17:58
svenyeah#asahi-dev · 2022-03-11 16:52
svenugh.. looks like adding the usb phy node and connecting it to dwc3 but disabling the atcphy driver results in dwc3 not being probed :(