From owner-freebsd-current@FreeBSD.ORG Wed Aug 25 01:43:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0597816A4CF for ; Wed, 25 Aug 2004 01:43:34 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEC4243D2F for ; Wed, 25 Aug 2004 01:43:33 +0000 (GMT) (envelope-from burpmaster@truffula.net) Received: from [192.168.0.2] (c-67-169-200-31.client.comcast.net[67.169.200.31]) by comcast.net (rwcrmhc13) with ESMTP id <2004082501433001500pfrl9e> (Authid: rogers240); Wed, 25 Aug 2004 01:43:30 +0000 Message-ID: <412BEEC0.2030408@truffula.net> Date: Tue, 24 Aug 2004 18:43:28 -0700 From: Brian Rogers User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040806) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?S=F8ren_Schmidt?= References: <412AD147.7050502@truffula.net> <412AF51B.8010801@DeepCore.dk> In-Reply-To: <412AF51B.8010801@DeepCore.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: freebsd-current@freebsd.org Subject: Re: ATAPI_RESET hang fix X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 25 Aug 2004 01:43:34 -0000 Søren Schmidt wrote: > Brian Rogers wrote: > >> I was getting the hang on start after the "ATAPI_RESET time = x" >> message. I stuck in a diagnostic printf before the ATAPI_RESET, and >> that actually fixed the hang. So I replaced it with a DELAY(50), and >> that also avoids the hang. >> >> I guess some ATAPI devices don't like being reset right after being >> queried. (Or there is a bug with handling that in FreeBSD) Patch is >> attached. > > Hmm, you could be on to something, but instead of using a fixed delay > I'd rather (re)introduce the wait for ready before selecting the > device in ata_command. Could you please try the following patch and > let me know if that fixes the problem as well ? It worked on the first try, but after that I couldn't reproduce it with a DVD in the drive, or with the drive empty, so I think that was a fluke. I tried about 5 times. I noticed this morning that my patch doesn't work when a DVD is in the drive. The drive must need more time in that case.