From: John Hodge Date: Wed, 14 Jul 2010 08:47:09 +0000 (+0800) Subject: Fiddling with ATA driver to try and fix RHW issues X-Git-Tag: rel0.06~109 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b24ae17361b2ad2d7a9bd57ad5a9bf6bdbdda59c;p=tpg%2Facess2.git Fiddling with ATA driver to try and fix RHW issues --- diff --git a/Modules/Storage/ATA/main.c b/Modules/Storage/ATA/main.c index f4130b04..4aee411c 100644 --- a/Modules/Storage/ATA/main.c +++ b/Modules/Storage/ATA/main.c @@ -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;