From owner-freebsd-usb@FreeBSD.ORG Thu Jul 23 18:50:24 2009 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B702A106566B; Thu, 23 Jul 2009 18:50:24 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 45AD98FC12; Thu, 23 Jul 2009 18:50:24 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by yxe11 with SMTP id 11so1927210yxe.3 for ; Thu, 23 Jul 2009 11:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=512FG/SiaW+ajoe+CMHToMbXkLMaCgXMIUz8Wra03vs=; b=E8oa2z+k42lMLm9eLNi99LksH02CBD1X9nRbEgWjiWpLJB4EnBDgrW29LJ6qvVcEcm K6c/r9sjMHCnPg08jg92wV6UUeRyEfQrwwAkC/+y6urnTp/Q1gaE2S7RHVUWxZ8/HDaQ oXFoUoDj9VPZT45NOPlgEHwUag3juPss0KMzE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AB946FiIOrTTkUZOitJjojKI5OaxRRlcF8WXrXQiNsjx/Kaa1nN5VUVP/x+nt6TDRj eC/iafdujwKtzGCHsC3gz63bsJM6uo2AcuvrPjL1gpUuX1xFZTHmzQqGg3jbxKjf/vf1 J1LW/XNxamckmGrprKE3IgA1YHtQres4gB1eA= MIME-Version: 1.0 Received: by 10.150.189.20 with SMTP id m20mr3623384ybf.255.1248373388472; Thu, 23 Jul 2009 11:23:08 -0700 (PDT) In-Reply-To: <200907211420.33571.hselasky@c2i.net> References: <1280352d0907101020q69f494cdndb01ff14ecf7ea8c@mail.gmail.com> <200907152236.58049.hselasky@c2i.net> <20090720215141.GL49724@elvis.mu.org> <200907211420.33571.hselasky@c2i.net> Date: Thu, 23 Jul 2009 11:23:08 -0700 Message-ID: From: Maksim Yevmenkin To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, Andrew Thompson , freebsd-current@freebsd.org Subject: Re: USB polling (75% done) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 18:50:25 -0000 On Tue, Jul 21, 2009 at 5:20 AM, Hans Petter Selasky wrote: > On Monday 20 July 2009 23:51:41 Alfred Perlstein wrote: >> * Hans Petter Selasky [090715 13:37] wrote: >> > Hi, >> > >> > I've added minimal polling support to the USB P4 repository now. Patch >> > can be found here: >> > >> > http://perforce.freebsd.org/chv.cgi?CH=166148 >> > >> > Dumping core to USB disk: Tested and works. >> > >> > Using USB keyboard in KDB: Does not work because Giant is not locked when >> > calling into the UKBD's get char routine. UKBD is Giant locked. Someone >> > familiar with the keyboard system on FreeBSD please step forward and fix >> > this so that UKBD gets independent of the Giant mutex. >> >> the ukbd driver needs giant? > > I think the keyboard mux is under Giant, and does not have any concept about > mutexes. Most simple solution would be that DDB locks Giant before entering > into the keyboard code. as i understand it, keyboard drivers (and kbdmux(4) is a keyboard driver), can/should not use any locks. period. so whatever calls into keyboard driver should take care of locking. thanks, max