diff options
Diffstat (limited to 'sys/dev/usb/uhid.c')
-rw-r--r-- | sys/dev/usb/uhid.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 34debf6..c1339f0 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -555,9 +555,16 @@ uhidioctl(dev, cmd, addr, flag, p) break; case USB_SET_IMMED: - if (*(int *)addr) + if (*(int *)addr) { + /* XXX should read into ibuf, but does it matter */ + r = usbd_get_report(sc->sc_iface, UHID_INPUT_REPORT, + sc->sc_iid, sc->sc_ibuf, + sc->sc_isize); + if (r != USBD_NORMAL_COMPLETION) + return (EOPNOTSUPP); + sc->sc_state |= UHID_IMMED; - else + } else sc->sc_state &= ~UHID_IMMED; break; |