Page MenuHomeFreeBSD

hid: u2f: stop interrupts on last-close
ClosedPublic

Authored by kevans on Sun, Jul 12, 7:48 PM.
Tags
None
Referenced Files
F164728834: D58199.id182394.diff
Mon, Aug 3, 9:24 AM
Unknown Object (File)
Sun, Aug 2, 8:33 AM
Unknown Object (File)
Sat, Aug 1, 4:37 AM
Unknown Object (File)
Fri, Jul 31, 9:47 AM
Unknown Object (File)
Fri, Jul 31, 4:36 AM
Unknown Object (File)
Fri, Jul 31, 3:13 AM
Unknown Object (File)
Thu, Jul 30, 4:15 AM
Unknown Object (File)
Thu, Jul 30, 12:29 AM
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.Mon, Jul 13, 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.