mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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 28d85db46b ("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
This commit is contained in:
1 parent
a5307a57c4
commit
2e3892671a
1 file changed
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user