From owner-freebsd-current@FreeBSD.ORG Fri Mar 4 21:51:28 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 0A7EC16A4CE; Fri, 4 Mar 2005 21:51:28 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4194C43D46; Fri, 4 Mar 2005 21:51:27 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.100] (adsl-68-252-59-28.dsl.wotnoh.ameritech.net [68.252.59.28]) (authenticated bits=0)j24LN3lu015597 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 4 Mar 2005 16:23:04 -0500 (EST) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-current@freebsd.org Date: Fri, 4 Mar 2005 16:55:09 -0500 User-Agent: KMail/1.7 References: <42224897.7050006@root.org> <422253D7.7000504@root.org> In-Reply-To: <422253D7.7000504@root.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1463418.WDrfn0UdsN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200503041655.26812.mistry.7@osu.edu> X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on crumpet.united-ware.com cc: stable@freebsd.org cc: current@freebsd.org cc: Nate Lawson 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 21:51:28 -0000 --nextPart1463418.WDrfn0UdsN Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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".=20 > > 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? =2D-=20 Anish Mistry --nextPart1463418.WDrfn0UdsN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCKNlOxqA5ziudZT0RAif1AKCXxcPF41NFnAT8N2OYgG+A5e2rNwCgkyqd tECribNQm++9NklnQVJfMB0= =1pc4 -----END PGP SIGNATURE----- --nextPart1463418.WDrfn0UdsN--