Kernel/VTerm - Fixed mistype in warning
[tpg/acess2.git] / KernelLand / Kernel / drv / pci.c
index 327d651..2c01b96 100644 (file)
@@ -73,7 +73,7 @@ Uint32        gaPCI_BusBitmap[256/32];
  */\r
 int PCI_Install(char **Arguments)\r
 {\r
-        int    i;\r
+        int    i, ret, bus;\r
        void    *tmpPtr;\r
        \r
        // Build Portmap\r
@@ -89,8 +89,11 @@ int PCI_Install(char **Arguments)
                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
@@ -109,10 +112,13 @@ int PCI_Install(char **Arguments)
        \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

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