From owner-freebsd-current@FreeBSD.ORG Thu Sep 22 18:10:14 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 067501065672 for ; Thu, 22 Sep 2011 18:10:14 +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 4CA4F8FC1B for ; Thu, 22 Sep 2011 18:10:13 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=G3me67YS4qRPZcaDO6kWttTShkFAyiMG89AbsUJ8MxU= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=uUbFkVXVqUkA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=qTTFKvau-as4jHQ0dEMA:9 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 182798277; Thu, 22 Sep 2011 20:10:11 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Thu, 22 Sep 2011 20:07:19 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <75E1A2A7D185F841A975979B0906BBA67BCCAB7609@AVEXMB1.qlogic.org> In-Reply-To: <75E1A2A7D185F841A975979B0906BBA67BCCAB7609@AVEXMB1.qlogic.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109222007.19182.hselasky@c2i.net> Cc: "freebsd-drivers@freebsd.org" , David Somayajulu Subject: Re: Choosing between DELAY(useconds) and pause() 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: Thu, 22 Sep 2011 18:10:14 -0000 On Thursday 22 September 2011 19:55:23 David Somayajulu wrote: > It appears that the pause() function cannot be used in driver functions > which are invoked early in the boot process. Is there is a kernel api > which a device driver can use to determine whether to use pause() or > DELAY(), for delays which are say greater than 10hz - may be even 1 hz ? Maybe you want to use something like this: if (cold) DELAY() else pause() In your code. --HPS