aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2026-07-21 16:57:47 +0000
committerKyle Evans <kevans@FreeBSD.org>2026-07-21 16:58:19 +0000
commit2e3892671a6fe2bceff6a9d8b439e7acd27dc28a (patch)
tree3578713b0761d4242edaf2dc15891e6ab9bbe96d
parenta5307a57c46f16f5b3c29708f1e528963dea150c (diff)
hid: u2f: stop interrupts on last-close
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. Reviewed by: aokblast, wulf Differential Revision: https://reviews.freebsd.org/D58199
-rw-r--r--sys/dev/hid/u2f.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c
index e1f696d72f01..d4bb56368080 100644
--- a/sys/dev/hid/u2f.c
+++ b/sys/dev/hid/u2f.c
@@ -223,7 +223,6 @@ u2f_detach(device_t dev)
}
taskqueue_drain(taskqueue_thread, &sc->sc_kqtask);
- hid_intr_stop(sc->sc_dev);
knlist_clear(&sc->sc_rsel.si_note, 0);
knlist_destroy(&sc->sc_rsel.si_note);
@@ -300,10 +299,8 @@ u2f_dtor(void *data)
{
struct u2f_softc *sc = data;
-#ifdef NOT_YET
/* Disable interrupts. */
hid_intr_stop(sc->sc_dev);
-#endif
mtx_lock(&sc->sc_mtx);
sc->sc_state.open = false;