Page MenuHomeFreeBSD

hid: u2f: stop interrupts on last-close
ClosedPublic

Authored by kevans on Jul 12 2026, 7:48 PM.
Tags
None
Referenced Files
F166351756: D58199.diff
Thu, Aug 13, 1:50 AM
Unknown Object (File)
Tue, Aug 11, 11:18 PM
Unknown Object (File)
Tue, Aug 11, 11:15 PM
Unknown Object (File)
Tue, Aug 11, 11:11 PM
Unknown Object (File)
Mon, Aug 10, 1:11 PM
Unknown Object (File)
Mon, Aug 10, 12:34 AM
Unknown Object (File)
Sun, Aug 9, 4:40 AM
Unknown Object (File)
Sat, Aug 8, 9:56 PM
Subscribers

Details

Summary

This fixes an issue with the Solo2 (and likely some of the Nitrokey
family) where hangs would occur with OpenSSH- it issues a CANCEL prior
to closing the device unconditionally, and without draining the read
endpoint we end up seeing the response to that CANCEL the next time
OpenSSH tries to connect. This throws the entire command/response
sequence out of whack.

This call used to break Yubikeys in some situations, but the fix that
landed in 28d85db46b48 ("xhci: Do not drop and add bits in xhci") seems
to have addressed that- presumably we sometimes end up stopping the
command and desyncing at the controller level. This probably implies
that we need a SYNCWRITE HID quirk, but that requires a little more work
in usbhid_sync_xfer() and this doesn't seem to cause any problems in
normal usage.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 13 2026, 10:23 AM

I was able to test one of the Yubikeys reported as broken earlier. It looks to work now.

sys/dev/hid/u2f.c
226

This line may be deleted as well. It is executed in cdev destructor now.

This revision was automatically updated to reflect the committed changes.