Misc - Cleaning up logging output
[tpg/acess2.git] / Modules / Storage / ATA / io.c
index 128fdca..b8a15d0 100644 (file)
@@ -117,7 +117,7 @@ int ATA_SetupIO(void)
        ENTER("");
 
        // Get IDE Controller's PCI Entry
-       ent = PCI_GetDeviceByClass(0x0101, 0xFFFF, -1);
+       ent = PCI_GetDeviceByClass(0x010100, 0xFFFF00, -1);
        LOG("ent = %i", ent);
        gATA_BusMasterBase = PCI_GetBAR(ent, 4);
        if( gATA_BusMasterBase == 0 ) {
@@ -285,7 +285,6 @@ int ATA_ReadDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer)
         int    disk = Disk & 1;
        Uint16  base;
        Sint64  timeoutTime;
-       Uint8   val;
 
        ENTER("iDisk XAddress iCount pBuffer", Disk, Address, Count, Buffer);
 
@@ -376,9 +375,15 @@ int ATA_ReadDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer)
        // Complete Transfer
        ATA_int_BusMasterWriteByte( cont * 8, 8 );      // Read and stop
 
-       val = inb(base+0x7);
-       LOG("Status byte = 0x%02x, Controller Status = 0x%02x",
-               val, ATA_int_BusMasterReadByte(cont * 8 + 2));
+       #if DEBUG
+       {
+               Uint8   val = inb(base+0x7);
+               LOG("Status byte = 0x%02x, Controller Status = 0x%02x",
+                       val, ATA_int_BusMasterReadByte(cont * 8 + 2));
+       }
+       #else
+       inb(base+0x7);
+       #endif
 
        if( gaATA_IRQs[cont] == 0 )
        {

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