*/\r
int PCI_Install(char **Arguments)\r
{\r
- int i;\r
+ int i, ret, bus;\r
void *tmpPtr;\r
\r
// Build Portmap\r
gaPCI_PortBitmap[MAX_RESERVED_PORT / 32] = 1 << i;\r
\r
// Scan Bus (Bus 0, Don't fill gPCI_Devices)\r
- i = PCI_ScanBus(0, 0);\r
- if(i != MODULE_ERR_OK) return i;\r
+ for( bus = 0; bus < giPCI_BusCount; bus ++ )\r
+ {\r
+ ret = PCI_ScanBus(bus, 0);\r
+ if(ret != MODULE_ERR_OK) return i;\r
+ }\r
\r
if(giPCI_DeviceCount == 0) {\r
Log_Notice("PCI", "No devices were found");\r
\r
// Reset counts\r
giPCI_DeviceCount = 0;\r
- giPCI_BusCount = 0;\r
+ giPCI_BusCount = 1;\r
memset(gaPCI_BusBitmap, 0, sizeof(gaPCI_BusBitmap));\r
// Rescan, filling the PCI device array\r
- PCI_ScanBus(0, 1);\r
+ for( bus = 0; bus < giPCI_BusCount; bus ++ )\r
+ {\r
+ PCI_ScanBus(bus, 1);\r
+ }\r
\r
// Complete Driver Structure\r
gPCI_DriverStruct.RootNode.Size = giPCI_DeviceCount;\r