From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YwXD5-00082D-Ap for mharc-grub-devel@gnu.org; Sun, 24 May 2015 10:49:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwXD3-00081z-0h for grub-devel@gnu.org; Sun, 24 May 2015 10:49:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwXCz-0005WQ-Rk for grub-devel@gnu.org; Sun, 24 May 2015 10:49:00 -0400 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:44054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwXCz-0005WM-Le for grub-devel@gnu.org; Sun, 24 May 2015 10:48:57 -0400 Received: from p5de4181c.dip0.t-ipconnect.de ([93.228.24.28] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YwXCz-0003ks-72 for grub-devel@gnu.org; Sun, 24 May 2015 14:48:57 +0000 Message-ID: <1432478922.2492.3.camel@users.sourceforge.net> Subject: [PATCH] disk/ahci: Use defines `GRUB_ATA_STATUS_BUSY` and `GRUB_ATA_STATUS_DRQ` From: Paul Menzel To: grub-devel@gnu.org Date: Sun, 24 May 2015 16:48:42 +0200 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-GWaKjojdTeOIVAh9Arlm" X-Mailer: Evolution 3.12.12-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:100:7463::3 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 14:49:01 -0000 --=-GWaKjojdTeOIVAh9Arlm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 24 May 2015 11:11:25 +0200 Instead of hard coding `0x88` use the macros defined in `disk/ata.h`. --- grub-core/disk/ahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c index d6bdbdd..7f75724 100644 --- a/grub-core/disk/ahci.c +++ b/grub-core/disk/ahci.c @@ -565,14 +565,14 @@ grub_ahci_pciinit (grub_pci_device_t dev, while (grub_get_time_ms () < endtime) { for (i =3D 0; i < nports; i++) - if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & 0x= 88)) + if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data & (G= RUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ))) break; if (i =3D=3D nports) break; } =20 for (i =3D 0; i < nports; i++) - if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data &= 0x88)) + if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].task_file_data &= (GRUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ))) { grub_dprintf ("ahci", "port %d is busy\n", i); failed_adevs[i] =3D adevs[i]; --=20 2.1.4 --=-GWaKjojdTeOIVAh9Arlm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlVh5NYACgkQPX1aK2wOHVhS3ACbB9T2NLSVyWNC1zGVrHkkvztW M9oAn1PLLZmEeoZFwL7xgvlcq4J8nUFc =q+F2 -----END PGP SIGNATURE----- --=-GWaKjojdTeOIVAh9Arlm--