[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix ATA compatibility mode check
From: |
Christian Franke |
Subject: |
[PATCH] Fix ATA compatibility mode check |
Date: |
Sun, 11 Jan 2009 16:18:10 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 |
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 <address@hidden>
* disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
mode check. Fix setting of compat_use[].
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)
{
- [PATCH] Fix ATA compatibility mode check,
Christian Franke <=