Re: USB2 - keyboard error

From: Yoshihiro Ota <ota_at_j.email.ne.jp>
Date: Tue, 18 Aug 2009 09:11:04 -0400
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.

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)
_at__at_ -606,20 +606,21 _at__at_
 }
 
 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;
Received on Tue Aug 18 2009 - 11:11:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:54 UTC