Fix ATA compatibility mode check
PATCH 1/1 Fix ATA compatibility mode check
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 <[email protected]>
* disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility mode check. Fix setting of compat_use[].
disk/ata.c +2 -2
@@ -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) {
Quoted 3 lines · Christian Franke
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.
Committed.
Christian