From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ettOY-0006iW-J9 for mharc-grub-devel@gnu.org; Thu, 08 Mar 2018 06:07:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ettOW-0006ht-77 for grub-devel@gnu.org; Thu, 08 Mar 2018 06:07:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ettOV-0002NE-5o for grub-devel@gnu.org; Thu, 08 Mar 2018 06:07:32 -0500 Received: from mail.gw90.de ([2a01:4f8:140:71f5::3]:58110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ettOU-0002LP-UV for grub-devel@gnu.org; Thu, 08 Mar 2018 06:07:31 -0500 Received: from [2a02:8109:b5bf:b1c0:a82:4547:7ec4:94da] (helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ettOK-0005TM-8I; Thu, 08 Mar 2018 11:07:20 +0000 Message-ID: <1520507230.2388.805.camel@users.sourceforge.net> Subject: Re: [PATCH] ahci: Improve error handling From: Paul Menzel To: Daniel Kiper , Stefan Fritsch Cc: Daniel Kiper , grub-devel@gnu.org Date: Thu, 08 Mar 2018 12:07:10 +0100 In-Reply-To: <20180129121644.GB30244@router-fw-old.local.net-space.pl> References: <20180123120056.GB6684@router-fw-old.local.net-space.pl> <20180129121644.GB30244@router-fw-old.local.net-space.pl> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-7pF7lllxAZvhNFeWBv1e" X-Mailer: Evolution 3.26.5-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:140:71f5::3 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:07:33 -0000 --=-7pF7lllxAZvhNFeWBv1e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Stefan, Am Montag, den 29.01.2018, 13:16 +0100 schrieb Daniel Kiper: > On Tue, Jan 23, 2018 at 01:00:56PM +0100, Daniel Kiper wrote: > > On Fri, Jan 19, 2018 at 02:13:29PM +0100, Stefan Fritsch wrote: > > > From: Stefan Fritsch > > >=20 > > > Check the error bits in the interrupt status register. According to t= he > > > AHCI 1.2 spec, "Interrupt sources that are disabled (?0?) are still > > > reflected in the status registers.", so this should work even though > > > grub uses polling > > >=20 > > > This fixes the following problem on a Fujitsu E744 laptop: > > >=20 > > > Sometimes there is a very long delay (up to several minutes) when > > > booting from hard disk. It seems accessing the DVD drive (which has n= o > > > disk inserted) sometimes fails with some errors, which leads to each > > > access being stalled until the 20s timeout triggers. This seems to > > > happen when grub is trying to read filesystem/partition data. > > >=20 > > > The problem is that the command_issue bit that is checked in the loop= is > > > only reset if the "HBA receives a FIS which clears the BSY, DRQ, and = ERR > > > bits for the command", but the ERR bit is never cleared. Therefore > > > command_issue is never reset and grub waits for the timeout. > > >=20 > > > The relevant bit in our case is the Task File Error Status (TFES), wh= ich > > > is equivalent to the ERR bit 0 in tfd. But this patch also checks > > > the other error bits except for the "Interface non-fatal error status= " > > > bit. > > >=20 > > > Signed-off-by: Stefan Fritsch > >=20 > > Reviewed-by: Daniel Kiper > >=20 > > If there are no objections I will apply this by the end of this week. >=20 > Applied! This is just a note, that in #coreboot@freenode.net, a Lenovo T420 with coreboot user reported this error with GRUB 2.02 (due to the DVD drive), and building the master branch with your commit solved the issue. Thank you very much. Thanks, Paul --=-7pF7lllxAZvhNFeWBv1e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQ8+w9d414FAVARIpk9fVorbA4dWAUCWqEZXwAKCRA9fVorbA4d WGtpAJ9YwI5Szw/1K0iHKJ3m38+rnqna7QCcCohsea3AWNPZTnbgzxnGUH2D0mk= =tUq0 -----END PGP SIGNATURE----- --=-7pF7lllxAZvhNFeWBv1e--