diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2004-11-11 22:59:26 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2004-11-11 22:59:26 +0000 |
| commit | 2f2c7518e2c4f0330e2859f00f67535e6e855ff0 (patch) | |
| tree | 9d043c7d173be6682a83dfa3b24264254866e615 /sys/dev | |
| parent | 06de3e925ea404a01be721c185e47c2760b26d5f (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/uhid.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 2e1751b77031..b5619dedc867 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -403,6 +403,7 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p) { struct uhid_softc *sc; usbd_status err; + int s; USB_GET_SC_OPEN(uhid, UHIDUNIT(dev), sc); @@ -411,6 +412,18 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p) if (sc->sc_dying) return (ENXIO); + /* + * HID devices tend to tromple in the TTY system's playground + * so we need to try make them play together. + * XXX This is far from perfect. It doesn't take into + * account removable devices for a start.. + */ + s = splhigh(); + tty_imask |= bio_imask; + bio_imask |= tty_imask; + update_intr_masks(); + splx( s ); + if (sc->sc_state & UHID_OPEN) return (EBUSY); sc->sc_state |= UHID_OPEN; |
