From: John Hodge Date: Fri, 28 Oct 2011 13:36:22 +0000 (+0800) Subject: Kernel/PCI - Fixed bug causing all BARs to be off X-Git-Tag: rel0.14~177 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=2bb9ab9c725dbd51d94f909c18f9dc5e1425c817;p=tpg%2Facess2.git Kernel/PCI - Fixed bug causing all BARs to be off --- diff --git a/Kernel/drv/pci.c b/Kernel/drv/pci.c index 41233367..c176f472 100644 --- a/Kernel/drv/pci.c +++ b/Kernel/drv/pci.c @@ -272,7 +272,7 @@ int PCI_CountDevices(Uint16 vendor, Uint16 device) tPCIDev PCI_GetDevice(Uint16 vendor, Uint16 device, int idx) { int i, j=0; - for(i=0;iConfigCache[0] = vendor_dev; - for( i = 1; i < 256/4; i ++, addr += 4 ) + for( i = 1, addr += 4; i < 256/4; i ++, addr += 4 ) { info->ConfigCache[i] = PCI_CfgReadDWord(addr); } @@ -456,11 +456,11 @@ int PCI_int_EnumDevice(Uint16 bus, Uint16 slot, Uint16 fcn, tPCIDevice *info) info->revision = tmp & 0xFFFF; info->oc = tmp >> 16; - //#if LIST_DEVICES - //Log("BAR0 0x%08x BAR1 0x%08x BAR2 0x%08x", info->ConfigCache[4], info->ConfigCache[5], info->ConfigCache[6]); - //Log("BAR3 0x%08x BAR4 0x%08x BAR5 0x%08x", info->ConfigCache[7], info->ConfigCache[8], info->ConfigCache[9]); - //Log("Class: 0x%04x", info->oc); - //#endif +// #if LIST_DEVICES +// Log("BAR0 0x%08x BAR1 0x%08x BAR2 0x%08x", info->ConfigCache[4], info->ConfigCache[5], info->ConfigCache[6]); +// Log("BAR3 0x%08x BAR4 0x%08x BAR5 0x%08x", info->ConfigCache[7], info->ConfigCache[8], info->ConfigCache[9]); +// Log("Class: 0x%04x", info->oc); +// #endif // Make node name info->Name[0] = '0' + bus/10;