USB2 - keyboard error
Hans Petter Selasky
hselasky at c2i.net
Tue Aug 18 13:32:00 UTC 2009
On Tuesday 18 August 2009 15:11:04 Yoshihiro Ota wrote:
> On Tue, 18 Aug 2009 07:06:29 +0200
>
> Hans Petter Selasky <hselasky at c2i.net> wrote:
> > On Tuesday 18 August 2009 04:51:05 Yoshihiro Ota wrote:
> > > Hi all and Hans,
> > >
> > > After switching code base for 8 release, I realized problems with my
> > > keyboard. The work-around described below fixed my problems.
> > >
> > > Could you be able to incorporate fix for this?
> > >
> > > Thanks,
> > > Hiro
> >
> > Can you resend the patch?
> >
> > --HPS
>
> Below is the change you suggested.
> It doesn't look good for other keyboards.
I can implement this like a sysctl:
hw.usb.ukbd.no_leds
--HPS
>
> Thanks,
> Hiro
>
> %env LANG=C svn diff --diff-cmd /usr/bin/diff -x-U10 input/ukbd.c
> Index: input/ukbd.c
> ===================================================================
> --- input/ukbd.c (revision 196086)
> +++ input/ukbd.c (working copy)
> @@ -606,20 +606,21 @@
> }
>
> static void
> ukbd_set_leds_callback(struct usb_xfer *xfer, usb_error_t error)
> {
> struct usb_device_request req;
> struct usb_page_cache *pc;
> uint8_t buf[2];
> struct ukbd_softc *sc = usbd_xfer_softc(xfer);
>
> +return; /* USB-keyboard workaround */
> switch (USB_GET_STATE(xfer)) {
> case USB_ST_TRANSFERRED:
> case USB_ST_SETUP:
> if (sc->sc_flags & UKBD_FLAG_SET_LEDS) {
> sc->sc_flags &= ~UKBD_FLAG_SET_LEDS;
>
> req.bmRequestType = UT_WRITE_CLASS_INTERFACE;
> req.bRequest = UR_SET_REPORT;
> USETW2(req.wValue, UHID_OUTPUT_REPORT, 0);
> req.wIndex[0] = sc->sc_iface_no;
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
More information about the freebsd-current
mailing list