From owner-cvs-all@FreeBSD.ORG Tue Aug 24 20:24:56 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1609716A4CE; Tue, 24 Aug 2004 20:24:56 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7CB843D48; Tue, 24 Aug 2004 20:24:55 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.0.12] (g4.samsco.home [192.168.0.12]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i7OKQ2iM096531; Tue, 24 Aug 2004 14:26:02 -0600 (MDT) (envelope-from scottl@freebsd.org) Message-ID: <412BA3CE.3060305@freebsd.org> Date: Tue, 24 Aug 2004 14:23:42 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040514 X-Accept-Language: en-us, en MIME-Version: 1.0 To: SXren Schmidt References: <200408242011.i7OKBQfI033557@repoman.freebsd.org> In-Reply-To: <200408242011.i7OKBQfI033557@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/ata ata-chipset.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 20:24:56 -0000 SXren Schmidt wrote: > sos 2004-08-24 20:11:26 UTC > > FreeBSD src repository > > Modified files: > sys/dev/ata ata-chipset.c > Log: > Sii_reset needs to wait up to 1 second to get slow disks with it so > use tsleep instead of DELAY. > > Revision Changes Path > 1.82 +1 -1 src/sys/dev/ata/ata-chipset.c I'm having a hard time following the code here, but it looks like ch->hw.reset() can get called with a mutex held, yes? hw.reset() will in turn wind up calling ctrl->reset(), which will call sii_reset() in the sii case. That means that the tsleep() can get called with a mutex held. This is probably not what you want. Also, if you are expecting the ctrl->reset() to work correctly before interrupts are enabled, you should be aware that tsleep and msleep will return immediately instead of sleeping in this case. Only DELAY() is safe (relatively) to use at boot before interrupts are enabled. Scott