X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Fdrv%2Fpci.c;h=9260847450dc62555a65603b182ceebdb37d0b5d;hb=efa38e0d56b1b620b6f4e5c4f91abc483a3065e2;hp=7ebab746653d1cb5a200b44c417e57ea9b06750e;hpb=6a086504b4c6e6e2fe9c24b5b4ea41451a9b4104;p=tpg%2Facess2.git diff --git a/Kernel/drv/pci.c b/Kernel/drv/pci.c index 7ebab746..92608474 100644 --- a/Kernel/drv/pci.c +++ b/Kernel/drv/pci.c @@ -141,7 +141,6 @@ int PCI_ScanBus(int BusID) { for( fcn = 0; fcn < 8; fcn++ ) // Max 8 functions per device { - Debug("%i:%i:%i", BusID, dev, fcn); // Check if the device/function exists if(!PCI_EnumDevice(BusID, dev, fcn, &devInfo)) continue; @@ -178,7 +177,7 @@ int PCI_ScanBus(int BusID) // Maybe bit 23 must be set for the device to be valid? // - Actually, maybe 23 means that there are sub-functions if(fcn == 0) { - if( !(devInfo.ConfigCache[3] & 0x800000) ) + if( !(devInfo.ConfigCache[3] & 0x00800000) ) break; } } @@ -461,7 +460,6 @@ int PCI_EnumDevice(Uint16 bus, Uint16 slot, Uint16 fcn, tPCIDevice *info) { Uint16 vendor; int i; - Uint32 addr; vendor = PCI_CfgReadWord(bus, slot, fcn, 0x0|0); if(vendor == 0xFFFF) // Invalid Device @@ -476,16 +474,9 @@ int PCI_EnumDevice(Uint16 bus, Uint16 slot, Uint16 fcn, tPCIDevice *info) info->oc = PCI_CfgReadWord(bus, slot, fcn, 0x8|2); // Load Config Bytes - addr = 0x80000000 | ((Uint)bus<<16) | ((Uint)slot<<11) | ((Uint)fcn<<8); for(i=0;i<256/4;i++) { - #if 0 - outd(0xCF8, addr); - info->ConfigCache[i] = ind(0xCFC); - addr += 4; - #else info->ConfigCache[i] = PCI_CfgReadDWord(bus, slot, fcn, i*4); - #endif } //#if LIST_DEVICES