ums(4) does not work if the mouse defaults to boot protocol. Force

the protocol to be report on each open, but ignore any errors as set
protocol for mice that don't implement the boot protocol can generate
an error.  Evidentally, the Gyration GyroPoint RF Technology Receiver
(Gyration Ultra Cordless) device has this problem.

Submitted by: Eugene M. Kim
PR: 106565
Approved by: re (blanket)
This commit is contained in:
Warner Losh 2007-07-25 06:43:06 +00:00
parent 1b649582bb
commit 8a639d8fb6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171574

View file

@ -630,6 +630,14 @@ ums_enable(v)
callout_handle_init((struct callout_handle *)&sc->callout_handle);
/*
* Force the report (non-boot) protocol.
*
* Mice without boot protocol support may choose not to implement
* Set_Protocol at all; do not check for error.
*/
usbd_set_protocol(sc->sc_iface, 1);
/* Set up interrupt pipe. */
err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr,
USBD_SHORT_XFER_OK, &sc->sc_intrpipe, sc,