From owner-freebsd-current@FreeBSD.ORG Sat Feb 14 16:57:04 2009 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 3AB9F106566B for ; Sat, 14 Feb 2009 16:57:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swip.net [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 99D9C8FC16 for ; Sat, 14 Feb 2009 16:57:03 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=kw03RjmKpLm8ql5X2xOdcA==:17 a=8kQB0OdkAAAA:8 a=f1nJBvbwA9XHSBBlRyYA:9 a=UDlE40X_lNXlDk0onu0A:7 a=C_aR2uU0St3GssUo_0qrqbUdp_EA:4 a=LY0hPdMaydYA:10 a=9aOQ2cSd83gA:10 a=FI1hCU0wAd_ig53y:21 a=_KR7oP3ccTe8gpjF:21 Received: from [85.19.218.115] (account mc467741@c2i.net HELO laptop) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 452849509; Sat, 14 Feb 2009 17:57:01 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sat, 14 Feb 2009 17:59:26 +0100 User-Agent: KMail/1.9.7 References: <20090213204112.7b982402.ota@j.email.ne.jp> <200902141041.28477.hselasky@c2i.net> <20090214113139.0d2cbd1a.ota@j.email.ne.jp> In-Reply-To: <20090214113139.0d2cbd1a.ota@j.email.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902141759.27816.hselasky@c2i.net> Cc: Yoshihiro Ota Subject: Re: USB2 - keyboard error 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: Sat, 14 Feb 2009 16:57:04 -0000 On Saturday 14 February 2009, Yoshihiro Ota wrote: > On Sat, 14 Feb 2009 10:41:28 +0100 > > Hans Petter Selasky wrote: > > On Saturday 14 February 2009, Yoshihiro Ota wrote: > > > I just installed 8-CURRENT with USB2 kernel config to join the test. > > > > > > I use a laptop PC and sometime use USB keyboard. > > > It was detected as following and it is usable when > > > I see FreeBSD login prompt. > > > > > > ugen0.2: at usbus0 > > > ushub2: on usbus0 > > > ushub2: 4 ports with 4 removable, bus powered > > > ugen0.3: at usbus0 > > > ukbd0: on > > > usbus0 kbd2 at ukbd0 > > > ukbd_set_leds_callback:556: error=USB_ERR_IOERROR > > > ukbd_set_leds_callback:556: error=USB_ERR_IOERROR > > > > > > > > > Regular alphabet keys work fine but as soon as I hit Alt-F2 to switch > > > to another virtual console (or is it called virtual terminal?), I > > > start seeing the above error. Then, keyboard stops responding or > > > starts repeating some irregular keys. > > > > > > This is without X. > > > > > > How do we begin fixing this issue? > > > > Hi, > > > > Looks like your keyboard has bug when it crashes on control requests. You > > can try slowing down the set leds request. Edit > > "src/sys/dev/usb2/input/ukbd2.c", then lookup: > > > > [UKBD_CTRL_LED] = { > > .type = UE_CONTROL, > > .endpoint = 0x00, /* Control pipe */ > > .direction = UE_DIR_ANY, > > .mh.bufsize = sizeof(struct usb2_device_request) + 1, > > .mh.callback = &ukbd_set_leds_callback, > > .mh.timeout = 1000, /* 1 second */ > > }, > > > > Add: > > .interval = 10, /* 10 milliseconds */ > > > > Try different interval values in the range 10 to 500 ms. > > > > --HPS > > It was actually, just in case, > .mh.interval = 10, /* 10 milliseconds */ > > It didn't seem to help. > > By the way, this is how dmesg look like from 7.1-RELEASE for the save dev. > And it is functioning okay on 7.1-RELEASE. > > uhub2: on > uhub0 uhub2: 4 ports with 4 removable, bus powered > ukbd0: on uhub2 > kbd2 at ukbd0 > Hi, I've looked at the USB code and I cannot find anything wrong. To get more debugging: sysctl hw.usb2.ukbd.debug=15 If you press num-lock, does the num-lock led turn on/off ? Is the behaviour the same for other USB keyboards ? --HPS