X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FStorage%2FATA%2Fio.c;h=b8a15d016424e768ec6fe6d1fdc0a9071d750ec8;hb=4bd32b966938a9f52c22d63cac0b22d6932e585d;hp=128fdca08e4b7564a640cdd04cf743a40bef7f4b;hpb=e957c67ea0f63a668303d087af7ee0c7ecff1f01;p=tpg%2Facess2.git diff --git a/Modules/Storage/ATA/io.c b/Modules/Storage/ATA/io.c index 128fdca0..b8a15d01 100644 --- a/Modules/Storage/ATA/io.c +++ b/Modules/Storage/ATA/io.c @@ -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 ) {