AsahiLinux / u-boot

"Das U-Boot" Source Tree
161 stars 24 forks source link

boot failure when kvm is connected #20

Open mikebeaton opened 10 months ago

mikebeaton commented 10 months ago

Hi - I have an XHCI error in U-Boot when my TESmart 4 port KVM switch is connected to my 2020 M1 Macbook Air.

I mentioned this already on #4, but looking again I think my error may be slightly different from the one reported there, I also have some more info.

The normal boot error looks like this:

normal

Examining the code, the timeout on event type 0 must be from within abort_td, which is only called in two places. If I rebuild U-Boot (asahi-v2023.07.02-4) and convert the two lines before the abort_td calls in drivers/usb/host/xhci-ring.c from debug to printf then I see:

enhanced

This looks to me as if there are possibly two bugs, the bulk transfer timeout happening anyway (why?) which eventually triggers a different (?) bug of a timeout on TRB_NONE inside abort_td (when trying to flush the queue after the bulk transfer timeout).

I appreciate this may be an upstream bug. I am happy to take advice and post upstream if that would help, or to run additional tests.

mikebeaton commented 10 months ago

Actually, looking at this, it seems to closely involve the code in https://github.com/AsahiLinux/u-boot/commit/2526cd99327, so probably not actually (just?) an upstream issue.

matdave commented 1 month ago

I am having this same issue when booting with a Dell D6000 connected. If I leave it disconnected and connect after boot it is fine, however when I have it connected during boot it times out and doesn't initialize until I unplug / replug it in.

matdave commented 1 month ago

Okay, so I just went through and unplugged everything, rebooted, and it was fine. Went one at a time plugging things into the D6000 and it came down to if my Keychron K4 keyboard was plugged in it would hit the timeout, but if it wasn't plugged it would boot normally. I switched it to bluetooth mode, and plugged in so it could still charge and it rebooted fine. For some reason the Keychron would show up as an additional 2 USB Devices, so maybe there is a bug when a "USB Hub" is plugged into a USB Hub?