From owner-freebsd-stable@FreeBSD.ORG Sun Jul 3 00:38:20 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86E1516A5EB; Sun, 3 Jul 2005 00:38:20 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD0CA44135; Sun, 3 Jul 2005 00:23:22 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 39A44625B1; Sat, 2 Jul 2005 17:20:20 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id A027D5C996 for ; Fri, 4 Mar 2005 13:52:45 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 8E07256FD9; Fri, 4 Mar 2005 21:51:33 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9B3C216A4D9; Fri, 4 Mar 2005 21:51:31 +0000 (GMT) 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 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-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Level: Cc: stable@freebsd.org, current@freebsd.org, Nate Lawson Subject: Re: patch: fix 30 second hang while resuming X-BeenThere: freebsd-stable@freebsd.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:38:21 -0000 X-Original-Date: Fri, 4 Mar 2005 16:55:09 -0500 X-List-Received-Date: Sun, 03 Jul 2005 00:38:21 -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--