Re: ukbd patch

看板DFBSD_submit作者時間15年前 (2011/01/25 17:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
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.
文章代碼(AID): #1DFfYPjp (DFBSD_submit)
文章代碼(AID): #1DFfYPjp (DFBSD_submit)