Fiddling with ATA driver to try and fix RHW issues
authorJohn Hodge <[email protected]>
Wed, 14 Jul 2010 08:47:09 +0000 (16:47 +0800)
committerJohn Hodge <[email protected]>
Wed, 14 Jul 2010 08:47:09 +0000 (16:47 +0800)
Modules/Storage/ATA/main.c

index f4130b0..4aee411 100644 (file)
@@ -251,6 +251,12 @@ int ATA_ScanDisk(int Disk)
 
        LOG("base = 0x%x", base);
 
+       if( 0xFF == inb(base+7) ) {
+               LOG("Floating bus");
+               LEAVE('i', 0);
+               return 0;
+       }
+
        // Send Disk Selector
        if(Disk == 1 || Disk == 3)
                outb(base+6, 0xB0);
@@ -283,7 +289,7 @@ int ATA_ScanDisk(int Disk)
                gATA_Disks[ Disk ].Sectors = data.identify.Sectors28;
 
 
-       LOG("gATA_Disks[ Disk ].Sectors = 0x%x", gATA_Disks[ Disk ].Sectors);
+       LOG("gATA_Disks[ %i ].Sectors = 0x%x", Disk, gATA_Disks[ Disk ].Sectors);
 
        {
                Uint64  val = gATA_Disks[ Disk ].Sectors / 2;

UCC git Repository :: git.ucc.asn.au