From owner-freebsd-current@FreeBSD.ORG Sat Jul 11 15:10:42 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 9C20A106566B; Sat, 11 Jul 2009 15:10:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id CDA8F8FC12; Sat, 11 Jul 2009 15:10:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=vYXrHWlrNuCLr8PUXtYA:9 a=JS0FUPc30KwD7OHMkYvszT0tOGIA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1275067602; Sat, 11 Jul 2009 17:10:40 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sat, 11 Jul 2009 17:10:16 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <1280352d0907101020q69f494cdndb01ff14ecf7ea8c@mail.gmail.com> In-Reply-To: <1280352d0907101020q69f494cdndb01ff14ecf7ea8c@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907111710.18843.hselasky@c2i.net> Cc: usb@freebsd.org, Andrew Thompson Subject: Re: USB polling 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, 11 Jul 2009 15:10:43 -0000 On Friday 10 July 2009 19:20:01 Andrew Thompson wrote: > Hi, > > The one usb task that is still an issue for 8.0 is the polling > support. The code needs to call into the host controller driver to > check if the usb descriptor has been marked as done and call the > completion callback. I am now traveling so cant look at it, if anyone > wants to have a look it would be fantastic. This is needed for places > where a usb keyboard is used and interrupts are disabled (root mount, > DDB). Hi, Probably we can implement USB polling with minimal transfer support. That basically means: - no timeouts - no automatic clear-stall Only support for ukbd and umass. Shouldn't be too hard. What is more hard, is that the sys/dev/usb/input/ukbd.c driver has to get away from using the Giant lock. Last time I looked at that it was impossible because the whole keyboard layer was under Giant. Has anything changed here? If not the USB keyboard will only work if kdb_enter() is called when Giant is locked! --HPS