From owner-freebsd-current@FreeBSD.ORG Fri Mar 4 22:11:02 2005 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 1BC1716A4CE; Fri, 4 Mar 2005 22:11:02 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id B29D143D41; Fri, 4 Mar 2005 22:11:01 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j24MAwZj011930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 4 Mar 2005 14:10:59 -0800 Message-ID: <4228DCF2.9090807@root.org> Date: Fri, 04 Mar 2005 14:10:58 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anish Mistry References: <42224897.7050006@root.org> <422253D7.7000504@root.org> <200503041655.26812.mistry.7@osu.edu> In-Reply-To: <200503041655.26812.mistry.7@osu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: stable@freebsd.org cc: current@freebsd.org Subject: Re: patch: fix 30 second hang while resuming 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: Fri, 04 Mar 2005 22:11:02 -0000 Anish Mistry wrote: > On Sunday 27 February 2005 06:12 pm, Nate Lawson wrote: > >>Nate Lawson wrote: >> >>>My system hangs a long time in ata_generic_reset() while >>>resuming. I did some hunting and found that the loop was running >>>for the full 310 * 100 ms (31 seconds). The bug is that the loop >>>never exits when mask goes to 0 even though this is a termination >>>condition (see end of the loop where the code masks off 1 and 2). >>> >>>The attached patch fixes this by exiting when the mask is set to >>>0 instead of looping the full 31 seconds. This is correct since >>>setting the mask to 0 is how the loop marks master/slave "done". >>>It also has a minor whitespace fix. >> >>Apologies, the last patch was not quite right. You need to check >>that both status values are not "busy" as well as the mask. This >>check could be merged in elsewhere as well. This was just a >>convenient place to put it. >> >>Please use the attached patch instead. > > This works well for me. Is this going to be committed? > Already done (by Matthew Dodd). It will hopefully be MFCd before 5.4. -- Nate