Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Mar 2005 14:10:58 -0800
From:      Nate Lawson <nate@root.org>
To:        Anish Mistry <mistry.7@osu.edu>
Cc:        current@freebsd.org
Subject:   Re: patch: fix 30 second hang while resuming
Message-ID:  <4228DCF2.9090807@root.org>
In-Reply-To: <200503041655.26812.mistry.7@osu.edu>
References:  <42224897.7050006@root.org> <422253D7.7000504@root.org> <200503041655.26812.mistry.7@osu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4228DCF2.9090807>