From owner-freebsd-drivers@FreeBSD.ORG Wed Oct 26 15:46:49 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8015016A421 for ; Wed, 26 Oct 2005 15:46:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18BCC43D45 for ; Wed, 26 Oct 2005 15:46:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 26 Oct 2005 12:03:32 -0400 From: John Baldwin To: freebsd-drivers@freebsd.org Date: Wed, 26 Oct 2005 11:24:15 -0400 User-Agent: KMail/1.8.2 References: <20051026031920.11BC983C03@ws1-1.us4.outblaze.com> In-Reply-To: <20051026031920.11BC983C03@ws1-1.us4.outblaze.com> MIME-Version: 1.0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510261124.16956.jhb@freebsd.org> Cc: Subject: Re: Cryptography Driver (Help !!!!) X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2005 15:46:49 -0000 On Tuesday 25 October 2005 11:19 pm, Yong Ma wrote: > Dear colleagues, > Cry for help!!!! > The cryptography card driver (polling mode, not interrupt mode) works well > under linux-2.4, but not working under FreeBSD-5.4. The DMA buffer just > keep intact under FreeBSD-5.4 after the Random value generation command > has been issued. > > Every thing is compared, but it still not working. First off, I don't really understand your question. Secondly, your driver might work better if you use the locking primitives we provide such as mutexes and condition variables. It looks like your home-grown lock might suffer from a deadlock condition if the current thread is preempted in m_sleep() for example and another thread tries to get the lock. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org