From owner-freebsd-current@FreeBSD.ORG Sun Jan 2 14:30:22 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CD5B106564A for ; Sun, 2 Jan 2011 14:30:22 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 610568FC12 for ; Sun, 2 Jan 2011 14:30:20 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=47jFoQlQiPaXYvJJRPLdRbboc2AFRw6czTf8DabKp4c= c=1 sm=1 a=dq2f58wT9zoA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=TBaf3Pgtm4k5Hk7rcFIA:9 a=2c7uo7Dr7IoX18MA-PEA:7 a=tE5JasSOI6JgVe_iMgH62t1UOWIA:4 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 69377522; Sun, 02 Jan 2011 15:30:19 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sun, 2 Jan 2011 15:30:27 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101021530.27319.hselasky@c2i.net> Cc: I Think Subject: Re: keyboard driver problem? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2011 14:30:22 -0000 On Sunday 02 January 2011 15:22:32 I Think wrote: > I've tried already to change both UKBD_NMOD and UKBD_NKEYCODE, but where is > no result. > #define UKBD_NKEYCODE 8 // doesn't work too > > > usbconfig -u 4 -a 2 dump_device_desc dump_curr_config_desc > > ugen4.2: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) > pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0008 > idVendor = 0x09da > idProduct = 0x054f > bcdDevice = 0x0102 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0000 > bNumConfigurations = 0x0001 > > > Configuration index 0 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x003b > bNumInterfaces = 0x0002 > bConfigurationValue = 0x0001 > iConfiguration = 0x0000 > bmAttributes = 0x00a0 > bMaxPower = 0x0032 > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0001 > bInterfaceClass = 0x0003 > bInterfaceSubClass = 0x0001 > bInterfaceProtocol = 0x0001 > iInterface = 0x0000 > > Additional Descriptor > > bLength = 0x09 > bDescriptorType = 0x21 > bDescriptorSubType = 0x11 > RAW dump: > 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x84, > 0x08 | 0x00 > > Endpoint 0 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0081 > bmAttributes = 0x0003 > wMaxPacketSize = 0x000c > bInterval = 0x0001 > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > > Interface 1 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0001 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0001 > bInterfaceClass = 0x0003 > bInterfaceSubClass = 0x0001 > bInterfaceProtocol = 0x0002 > iInterface = 0x0000 > > Additional Descriptor > > bLength = 0x09 > bDescriptorType = 0x21 > bDescriptorSubType = 0x11 > RAW dump: > 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x57, > 0x08 | 0x00 > > Endpoint 0 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0082 > bmAttributes = 0x0003 > wMaxPacketSize = 0x0008 > bInterval = 0x0001 > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > You could maybe try this. Lookup the following code in ukbd.c. Add the lines marked with + if (sc->sc_kbd_id != 0) { /* check and remove HID ID byte */ usbd_copy_out(pc, 0, &id, 1); if (id != sc->sc_kbd_id) { DPRINTF("wrong HID ID\n"); goto tr_setup; } offset = 1; len--; } else { offset = 0; } + if (len == 12) { + offset += 2; + len -= 2; + } + if (len == 11) { + offset += 1; + len -= 1; + } --HPS