Skip to content

U-Boot: xhci abort keeps a late interrupt report and balances DMA (follow-up to AsahiLinux/u-boot#34) #83

Open

Description

@cb2206

Summary

These are the fixes for the two xhci defects you found while reviewing AsahiLinux/u-boot#34 ("Before we package the shorter timeout…"), as a patch series for Aurora's U-Boot packaging:

  1. usb: xhci: Honour nonblock for interrupt transfers (bf08a2ffe4, the original PR commit): idle interrupt polling (Magic Keyboard 05ac:029a on a USB-C hub at power-on) no longer stalls EFI disk reads for about 80 s.
  2. usb: xhci: Keep a late transfer result and balance DMA on abort (54ae558503, new):
    • abort_td() reports stopped / completed / unknown. A transfer that completes between the timeout and the Stop Endpoint command keeps its result (only for an event on the TD's last TRB), so a key report isn't turned into a timeout. The old completion-code check there never fired because of a misplaced parenthesis (transfer_len != COMP_STOP).
    • On a timeout, the transfer buffer is unmapped once the stop is confirmed (bulk and control). When the Stop Endpoint or Set TR Dequeue command isn't acknowledged, the buffer stays mapped, because the controller may still own it.

Branch: https://github.com/cb2206/u-boot/commits/xhci-abort-cleanup (based on asahi-releng ec49c9d70e). Both patches also apply on top of the asahi-v2026.07-2 tag that uboot-asahi packages.

Tested

14" MacBook Pro M1 Pro (J314s), Aurora 2026.10.11.15, as a local uboot-asahi 2026.07.asahi2-1.3 (the 2026.07-asahi2 package plus both patches; m1n1 aurora17 rebuilt boot.bin through the normal hook). It boots with the Magic Keyboard on a USB-C hub at power-on, and the keyboard works in the GRUB menu. (No systematic check for lost or doubled key presses yet.) Boot time felt normal but wasn't measured this time (1.2 with only the first patch: about 16 s from power-on to Linux, versus about 90 s stock). The translated-DART mapping count from your review wasn't reproduced here.

Note

Both patches were written with AI assistance (Claude) and tested on my hardware. The same disclosure is on AsahiLinux/u-boot#34, where their contribution policy may rule them out.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions