#asahi-dev · 2023-06-06 07:31
marcanwas sort of blindly based on that xhc-re repo, but it already seems to be more reliable#asahi-dev · 2023-06-06 07:31
kettenishah#asahi-dev · 2023-06-06 07:31
marcan(there's a fixup commit in the bits branch)#asahi-dev · 2023-06-06 07:31
marcanand you might want to backport the improved asmedia loading code from linux :)#asahi-dev · 2023-06-06 07:30
marcankettenis: pushed some more fixes to asahi-releng btw#asahi-dev · 2023-06-06 07:29
kettenismarcan: glad the PCIe issue was found#asahi-dev · 2023-06-06 07:28
marcanugh#asahi-dev · 2023-06-06 07:27
chadmedhttps://github.com/chadmed/asahi-audio/issues/10#asahi-dev · 2023-06-06 07:27
marcanchadmed: where is that from?#asahi-dev · 2023-06-06 07:27
marcanplease do#asahi-dev · 2023-06-06 07:26
chadmedim just going to break my repo so that trying to load the dsp config crashes pipewire#asahi-dev · 2023-06-06 07:22
chadmed"but I read somewhere that if you follow the right steps on a MacBook M1 Pro 14 inch, it now was safe to use because of a safety deamon" aaaaaaaaaaaaaaaaaaaaaaaaaa#asahi-dev · 2023-06-06 07:01
marcanok, going to spin another kernel merge & builds#asahi-dev · 2023-06-06 07:01
marcanI made some improvements to the asmedia code based on https://github.com/cyrozap/asmedia-xhc-re#asahi-dev · 2023-06-06 07:00
marcanjannau: if I make u-boot break the asmedia (not load firmware), linux can still successfully laod it now#asahi-dev · 2023-06-06 07:00
marcanand rejoice!#asahi-dev · 2023-06-06 07:00
marcanthere's an underlying problem there but it shouldn't be panicking#asahi-dev · 2023-06-06 06:59
marcanjannau: I have a different variant of that when I deliberately break asmedia, removing that codepath#asahi-dev · 2023-06-06 06:47
marcanoof#asahi-dev · 2023-06-06 06:42
jannauI'll look tonight at it#asahi-dev · 2023-06-06 06:41
jannaumeanwhile I found another USB u-boot BUG. usb keyboard with integrated usb 3.0 hub, lots of "Resetting EP 2...", then "XHCI timeout on event type 0... cannot recover.", "BUG atdrivers/usb/host/xhci-ring.c:519/xhci_wait_for_event()!"#asahi-dev · 2023-06-06 06:38
marcanI think I know what this is, some stupid race#asahi-dev · 2023-06-06 06:38
jannauwith pwr-en fixed asmedia probably works in linux without firmware in u-boot. u-boot should leave the device alone if the firmware is missing#asahi-dev · 2023-06-06 06:38
marcanmeanwhile lol broadcom oops now#asahi-dev · 2023-06-06 06:35
marcanthere is some stuff m1n1 does which might need to be redone#asahi-dev · 2023-06-06 06:34
jannauI suspect we miss some reset magic in the pcie controller to restart link training#asahi-dev · 2023-06-06 06:33
marcaner, the aquantia issues#asahi-dev · 2023-06-06 06:33
marcancould explain the asmedia issues#asahi-dev · 2023-06-06 06:33
marcanthis might also explain other badness, e.g. if iBoot does some power sequencing and we break it#asahi-dev · 2023-06-06 06:32
marcanthat should fix the handoff (though it still doesn't explain why it fails to come back up, you'd *think* that would work, but these chips are cursed so who knows)#asahi-dev · 2023-06-06 06:32
marcanwe need ASIS#asahi-dev · 2023-06-06 06:31
marcanwhen we request the GPIO, we use LOW#asahi-dev · 2023-06-06 06:31
marcanin the pcie driver#asahi-dev · 2023-06-06 06:31
jannauin the pcie driver or elsewhere?#asahi-dev · 2023-06-06 06:29
marcanjannau: duh. we're unconditionally clearing PWREN on boot.#asahi-dev · 2023-06-06 06:21
marcanwhen linux boots somehow the link goes down#asahi-dev · 2023-06-06 06:21
marcanno, it's something else, you're right#asahi-dev · 2023-06-06 06:20
marcanwait huh#asahi-dev · 2023-06-06 06:19
jannaudid we change that in the linux pcie driver? the link up check was supposed to skip the reset#asahi-dev · 2023-06-06 06:15
marcanthat's when the link drops and never comes back up#asahi-dev · 2023-06-06 06:15
marcanjannau: right, so u-boot leaves the device up but then Linux tries to reset it unconditionally and it never comes back#asahi-dev · 2023-06-06 05:23
jannaufails with "pci@3,0 link didn't come up" but the link should be up. usb devices work in u-boot with firmware#asahi-dev · 2023-06-06 05:10
jannauyes, the issue is that we don't know how to reset the pcie port or the device reset via the smc pwr-enable gpio doesn't reset the device completely#asahi-dev · 2023-06-06 05:10
marcanI hate this asmedia stuff... we need to figure out how to properly full reset it and reliably reload firmware, for one#asahi-dev · 2023-06-06 05:08
jannauI assumed u-boot with firmware would be ok. it was in my previous tests. trying to bring it without firmware resulted always in a broken device#asahi-dev · 2023-06-06 05:07
marcanjannau: works without u-boot though, so strictly an issue with whatever u-boot does I guess#asahi-dev · 2023-06-06 05:04
marcanOK#asahi-dev · 2023-06-06 05:04
marcanI thought only one of the two cases was#asahi-dev · 2023-06-06 05:02
marcanhuh#asahi-dev · 2023-06-06 05:02
jannaumarcan: asmedia pcie xhci is broken without FW prepared for u-boot. still broken with FW present and detected in u-boot though