ukbd patch

YONETANI Tomokazu y0n3t4n1 at gmail.com
Tue Jan 25 01:31:30 PST 2011


Hi,

On Tue, Jan 25, 2011 at 07:29:10AM +0100, Magliano Andrea wrote:
> as i am new to kernel drivers, i suppose (just looking at usbd_get_quirks() prototype) that the quirk for usb keyboard was set the wrong way.

The code as is looks correct to me: set the protocol unless the quirk is set.
Instead, try adding a quirk like below to usb_quirks[] (NOTE: the ids may be
different from yours) and rebuild the usb.ko if kldstat command shows it,
or the kernel if not.

diff --git a/sys/bus/usb/usb_quirks.c b/sys/bus/usb/usb_quirks.c
index 4ef50d3..20573f2 100644
--- a/sys/bus/usb/usb_quirks.c
+++ b/sys/bus/usb/usb_quirks.c
@@ -57,6 +57,9 @@ static const struct usbd_quirk_entry {
 	u_int16_t bcdDevice;
 	struct usbd_quirks quirks;
 } usb_quirks[] = {
+ /* Apple USB keyboard */
+ { .idVendor = 0x05ac, .idProduct = 0x021d, .bcdDevice = ANY,
+   .quirks   = { UQ_NO_SET_PROTO}},
  /* KYE Niche mouse */
  { .idVendor = 0x0458, .idProduct = 0x0001, .bcdDevice = 0x100,
    .quirks   = { UQ_NO_SET_PROTO}},


Cheers.





More information about the Submit mailing list