From owner-freebsd-current@FreeBSD.ORG Fri Jul 24 13:52:22 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 78A6F106564A; Fri, 24 Jul 2009 13:52:22 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id A94D48FC0A; Fri, 24 Jul 2009 13:52:21 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=gg2W7PyvkLb8p4ie143lBA==:17 a=MlYEcbAALPz4MxP3jM0A:9 a=t3bJZxhF-4o3L-C5tUAA:7 a=xhwv4h41celMEzYuf8v6XQfrCiIA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 229864229; Fri, 24 Jul 2009 15:52:20 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Fri, 24 Jul 2009 15:52:08 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <1280352d0907101020q69f494cdndb01ff14ecf7ea8c@mail.gmail.com> <4A69AB91.2010208@icyb.net.ua> In-Reply-To: <4A69AB91.2010208@icyb.net.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907241552.10763.hselasky@c2i.net> Cc: usb@freebsd.org, Andriy Gapon , Andrew Thompson , Maksim Yevmenkin Subject: Re: USB polling (75% done) 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: Fri, 24 Jul 2009 13:52:23 -0000 On Friday 24 July 2009 14:39:45 Andriy Gapon wrote: > Maybe Giant asserts in ukbd are not needed? Option 1) They are needed as long as ukbd is not allowed to lock Giant when it needs it. Like when you are at the console and have Scroll-Lock pressed, and then something is printed, then printf() will directly call into the keyboard layer, to disable scroll lock and its associated LED. Locking Giant from a sub-routine of printf() is not smart and leads to LOR's. Having an AT-keyboard you can always peek or poke a port directly, but an USB-keyboard is quite more advanced. And like some other guy pointed out recently: In some cases the keyboard gets enabled without Giant locked, even though that is a requirement. Option 2) Some work is needed to get the non-USB part of the statemachine in ukbd out of Giant. I'm not a kbdmux expert either. I don't have the full overview from where the variables in the ukbd's keyboard state can be read and written, and which fields in the ukbd's keyboard state needs to remain Giant locked due to kbdmux and kbd. That's basically what is stopping me from converting ukbd free of Giant. Option 3) Assume that the kernel never panics :-) --HPS