mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-31 04:45:39 +01:00
xhci: Refactor xhci_generic_setup code
Our USB TRB buildup subroutines were previously difficult to follow. In setup_generic_chain_sub(), the routine filled TRB packets based on the characteristics passed by the caller and the current state (for example, whether the TRB was the last in the TD). However, most TRB types (except Normal TRBs) cannot be shared across TDs. To simplify the logic, refactor xhci_setup_generic() so that TRBs are constructed according to their transfer type, with dedicated helper functions for each TRB type. Sponsored by: The FreeBSD Foundation Assisted-by: Claude Code (Opus 4.6, Opus 4.8(1M) and Sonet 5.0) Differential Revision: https://reviews.freebsd.org/D57130
This commit is contained in:
1 parent
a594783bac
commit
e0b235ecd4
1 file changed
+533
-526
+533
-526
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user