Page MenuHomeFreeBSD

LinuxKPI: usb: add usb_anchor support
Needs RevisionPublic

Authored by bz on Feb 1 2026, 5:11 PM.
Tags
None
Referenced Files
F166106702: D55035.id.diff
Tue, Aug 11, 6:53 PM
Unknown Object (File)
Sun, Aug 9, 4:02 PM
Unknown Object (File)
Sat, Aug 8, 4:59 PM
Unknown Object (File)
Sat, Aug 8, 8:32 AM
Unknown Object (File)
Fri, Aug 7, 7:40 PM
Unknown Object (File)
Fri, Aug 7, 5:15 AM
Unknown Object (File)
Mon, Aug 3, 2:17 AM
Unknown Object (File)
Sat, Aug 1, 7:20 AM

Details

Reviewers
aokblast
Group Reviewers
USB
linuxkpi
Summary

Allow URBs to be anchored and released upon completion keeping a list
of them (managed by the driver). This allows the driver (rtw89) upon
reset or disconnect to cancel all outstanding TX.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70318
Build 67201: arc lint + arc unit

Event Timeline

bz requested review of this revision.Feb 1 2026, 5:11 PM

Plus these points, usb_unlink_urb_sub bypass unanchored in not started yet branch. Causing a forever run if the xfer hasn't start yet. Also, we need usb_put_urb in the same point

sys/compat/linuxkpi/common/src/linuxkpi_usb.c
1047

Re-check needs to check urb->anchor == ua? It want to prevent condition that reanchor while unanchoring?

Thanks for the comment; I have a way larger branch I think than what is in review. Do you want to have a look at the entire bits? I'd be thrilled if someone will review them :) and more than happy to extract the next days.

In D55035#1341051, @bz wrote:

Thanks for the comment; I have a way larger branch I think than what is in review. Do you want to have a look at the entire bits? I'd be thrilled if someone will review them :) and more than happy to extract the next days.

Do you mean https://reviews.freebsd.org/D54987? I was typing something while you leave your comment:)

This revision now requires changes to proceed.Sat, Jul 25, 3:08 PM
In D55035#1341051, @bz wrote:

Thanks for the comment; I have a way larger branch I think than what is in review. Do you want to have a look at the entire bits? I'd be thrilled if someone will review them :) and more than happy to extract the next days.

Do you mean https://reviews.freebsd.org/D54987? I was typing something while you leave your comment:)

No, I mean more changes to be added to the stack; when I first did this it was a/multiple year(s) ago. I put some of that out earlier this year in order to get the de-coupling of LinuxKPI from the native stack structures out but that got into controversial discussions. In the follow-up I added more stuff for more USB wifi drivers ... which I never uploaded to Phab.

I'll go through what you have and would love to put a new stack up next week, if that's okay?

In D55035#1341099, @bz wrote:
In D55035#1341051, @bz wrote:

Thanks for the comment; I have a way larger branch I think than what is in review. Do you want to have a look at the entire bits? I'd be thrilled if someone will review them :) and more than happy to extract the next days.

Do you mean https://reviews.freebsd.org/D54987? I was typing something while you leave your comment:)

No, I mean more changes to be added to the stack; when I first did this it was a/multiple year(s) ago. I put some of that out earlier this year in order to get the de-coupling of LinuxKPI from the native stack structures out but that got into controversial discussions. In the follow-up I added more stuff for more USB wifi drivers ... which I never uploaded to Phab.

I'll go through what you have and would love to put a new stack up next week, if that's okay?

Yes, I can review them. I also need somebody to review my USB 3.1 and 3.2 patches:)