diff options
-rw-r--r-- | share/man/man4/uhid.4 | 13 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 25 | ||||
-rw-r--r-- | sys/dev/usb/usb.h | 3 |
3 files changed, 4 insertions, 37 deletions
diff --git a/share/man/man4/uhid.4 b/share/man/man4/uhid.4 index 321c8c62e3d..bd608f12063 100644 --- a/share/man/man4/uhid.4 +++ b/share/man/man4/uhid.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uhid.4,v 1.16 2010/07/10 20:40:34 gilles Exp $ +.\" $OpenBSD: uhid.4,v 1.17 2016/02/28 17:57:50 stefan Exp $ .\" $NetBSD: uhid.4,v 1.13 2001/12/29 14:41:59 augustss Exp $ .\" .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: July 10 2010 $ +.Dd $Mdocdate: February 28 2016 $ .Dt UHID 4 .Os .Sh NAME @@ -59,15 +59,6 @@ struct usb_ctl_report_desc { u_char ucrd_data[1024]; /* filled data size will vary */ }; .Ed -.It Dv USB_SET_IMMED (int) -Sets the device in a mode where each -.Xr read 2 -will return the current value of the input report. -Normally a -.Xr read 2 -will only return the data that the device reports on its -interrupt pipe. -This call may fail if the device does not support this feature. .It Dv USB_GET_REPORT (struct usb_ctl_report) Get a report from the device without waiting for data on the interrupt pipe. diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index e56b2317d6a..e1ad7d026c8 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.63 2016/01/09 04:14:42 jcs Exp $ */ +/* $OpenBSD: uhid.c,v 1.64 2016/02/28 17:57:50 stefan Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -78,7 +78,6 @@ struct uhid_softc { struct process *sc_async; /* process that wants SIGIO */ u_char sc_state; /* driver state */ #define UHID_ASLP 0x01 /* waiting for device data */ -#define UHID_IMMED 0x02 /* return read data immediately */ int sc_refcnt; }; @@ -229,7 +228,6 @@ uhidopen(dev_t dev, int flag, int mode, struct proc *p) clalloc(&sc->sc_q, UHID_BSIZE, 0); sc->sc_obuf = malloc(sc->sc_hdev.sc_osize, M_USBDEV, M_WAITOK); - sc->sc_state &= ~UHID_IMMED; sc->sc_async = NULL; return (0); @@ -261,14 +259,6 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag) u_char buffer[UHID_CHUNK]; DPRINTFN(1, ("uhidread\n")); - if (sc->sc_state & UHID_IMMED) { - DPRINTFN(1, ("uhidread immed\n")); - if (uhidev_get_report(sc->sc_hdev.sc_parent, - UHID_INPUT_REPORT, sc->sc_hdev.sc_report_id, buffer, - sc->sc_hdev.sc_isize) != sc->sc_hdev.sc_isize) - return (EIO); - return (uiomovei(buffer, sc->sc_hdev.sc_isize, uio)); - } s = splusb(); while (sc->sc_q.c_cc == 0) { @@ -367,7 +357,6 @@ int uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag, struct proc *p) { - u_char buffer[UHID_CHUNK]; usbd_status err; int rc, size; @@ -399,18 +388,6 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, return (EPERM); break; - case USB_SET_IMMED: - if (*(int *)addr) { - if (uhidev_get_report(sc->sc_hdev.sc_parent, - UHID_INPUT_REPORT, sc->sc_hdev.sc_report_id, buffer, - sc->sc_hdev.sc_isize) != sc->sc_hdev.sc_isize) - return (EOPNOTSUPP); - - sc->sc_state |= UHID_IMMED; - } else - sc->sc_state &= ~UHID_IMMED; - break; - case USB_GET_DEVICEINFO: usbd_fill_deviceinfo(sc->sc_hdev.sc_udev, (struct usb_device_info *)addr, 1); diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 2816c1805bf..9c06d5ec0df 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.h,v 1.53 2015/07/09 05:40:44 mpi Exp $ */ +/* $OpenBSD: usb.h,v 1.54 2016/02/28 17:57:50 stefan Exp $ */ /* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ @@ -761,7 +761,6 @@ struct usb_device_stats { /* Generic HID device */ #define USB_GET_REPORT_DESC _IOR ('U', 21, struct usb_ctl_report_desc) -#define USB_SET_IMMED _IOW ('U', 22, int) #define USB_GET_REPORT _IOWR('U', 23, struct usb_ctl_report) #define USB_SET_REPORT _IOW ('U', 24, struct usb_ctl_report) #define USB_GET_REPORT_ID _IOR ('U', 25, int) |