From: Christian Franke <Christian.Franke@t-online.de>
To: grub-devel@gnu.org
Subject: [PATCH] Fix ATA compatibility mode check
Date: Sun, 11 Jan 2009 16:18:10 +0100 [thread overview]
Message-ID: <496A0DB2.3030906@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
For the compatibility mode check, the ATA driver uses the bits in the
"Revision" byte instead of the "Programming Interface Byte" of the class
value (See T13/1510D). The compat_use[] flags are never set.
This patch fixes both issues.
Christian
2009-01-11 Christian Franke <franke@computer.org>
* disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
mode check. Fix setting of compat_use[].
[-- Attachment #2: grub2-ata-compat-fix.patch --]
[-- Type: text/x-diff, Size: 624 bytes --]
diff --git a/disk/ata.c b/disk/ata.c
index 6e0b8b8..4ca63c2 100644
--- a/disk/ata.c
+++ b/disk/ata.c
@@ -504,7 +504,7 @@ grub_ata_pciinit (int bus, int device, int func,
for (i = 0; i < 2; i++)
{
/* Set to 0 when the channel operated in compatibility mode. */
- int compat = (class >> (2 * i)) & 1;
+ int compat = (class >> (8 + 2 * i)) & 1;
rega = 0;
regb = 0;
@@ -515,7 +515,7 @@ grub_ata_pciinit (int bus, int device, int func,
{
rega = grub_ata_ioaddress[i];
regb = grub_ata_ioaddress2[i];
- compat_use[i] = 0;
+ compat_use[i] = 1;
}
else if (compat)
{
next reply other threads:[~2009-01-11 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 15:18 Christian Franke [this message]
2009-01-12 20:23 ` [PATCH] Fix ATA compatibility mode check Christian Franke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=496A0DB2.3030906@t-online.de \
--to=christian.franke@t-online.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.