Give the output information in right place.
authorvanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 3 Jun 2008 02:16:12 +0000 (02:16 +0000)
committervanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 3 Jun 2008 02:16:12 +0000 (02:16 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@5317 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c

index 587f176..0df4db6 100644 (file)
@@ -1222,122 +1222,122 @@ PciScanBus_WithoutHotPlugDeviceSupport (
                 Func\r
                 );\r
 \r
-      if (!EFI_ERROR (Status)   &&\r
-          (IS_PCI_BRIDGE (&Pci) ||\r
-          IS_CARDBUS_BRIDGE (&Pci))) {\r
+      if (!EFI_ERROR (Status)) {\r
+        DEBUG((EFI_D_ERROR, "Found DEV(%02d,%02d,%02d)\n", StartBusNumber, Device, Func));\r
+        \r
+        if (IS_PCI_BRIDGE (&Pci) ||\r
+          IS_CARDBUS_BRIDGE (&Pci)) {\r
 \r
-        DEBUG((EFI_D_ERROR, "Found DEV(%02d,%02d,%02d)\n", StartBusNumber, Device, Func ));\r
-\r
-        //\r
-        // Get the bridge information\r
-        //\r
-        Status = PciSearchDevice (\r
-                  Bridge,\r
-                  &Pci,\r
-                  StartBusNumber,\r
-                  Device,\r
-                  Func,\r
-                  &PciDevice\r
-                  );\r
-\r
-        if (EFI_ERROR (Status)) {\r
-          return Status;\r
-        }\r
-\r
-        //\r
-        // Add feature to support customized secondary bus number\r
-        //\r
-        if (*SubBusNumber == 0) {\r
-          *SubBusNumber   = *PaddedBusRange;\r
-          *PaddedBusRange = 0;\r
-        }\r
-\r
-        (*SubBusNumber)++;\r
-\r
-        SecondBus = (*SubBusNumber);\r
-\r
-        Register  = (UINT16) ((SecondBus << 8) | (UINT16) StartBusNumber);\r
-\r
-        Address   = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x18);\r
-\r
-        Status = PciRootBridgeIoWrite (\r
-                                        PciRootBridgeIo,\r
-                                        &Pci,\r
-                                        EfiPciWidthUint16,\r
-                                        Address,\r
-                                        1,\r
-                                        &Register\r
-                                        );\r
-\r
-        //\r
-        // Initialize SubBusNumber to SecondBus\r
-        //\r
-        Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
-        Status = PciRootBridgeIoWrite (\r
-                                        PciRootBridgeIo,\r
-                                        &Pci,\r
-                                        EfiPciWidthUint8,\r
-                                        Address,\r
-                                        1,\r
-                                        SubBusNumber\r
-                                        );\r
-        //\r
-        // If it is PPB, resursively search down this bridge\r
-        //\r
-        if (IS_PCI_BRIDGE (&Pci)) {\r
           //\r
-          // Temporarily initialize SubBusNumber to maximum bus number to ensure the\r
-          // PCI configuration transaction to go through any PPB\r
+          // Get the bridge information\r
           //\r
-          Address   = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
-          Register  = 0xFF;\r
+          Status = PciSearchDevice (\r
+                    Bridge,\r
+                    &Pci,\r
+                    StartBusNumber,\r
+                    Device,\r
+                    Func,\r
+                    &PciDevice\r
+                    );\r
+        \r
+          if (EFI_ERROR (Status)) {\r
+            return Status;\r
+          }\r
+        \r
+          //\r
+          // Add feature to support customized secondary bus number\r
+          //\r
+          if (*SubBusNumber == 0) {\r
+            *SubBusNumber   = *PaddedBusRange;\r
+            *PaddedBusRange = 0;\r
+          }\r
+        \r
+          (*SubBusNumber)++;\r
+        \r
+          SecondBus = (*SubBusNumber);\r
+        \r
+          Register  = (UINT16) ((SecondBus << 8) | (UINT16) StartBusNumber);\r
+        \r
+          Address   = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x18);\r
+        \r
           Status = PciRootBridgeIoWrite (\r
                                           PciRootBridgeIo,\r
                                           &Pci,\r
-                                          EfiPciWidthUint8,\r
+                                          EfiPciWidthUint16,\r
                                           Address,\r
                                           1,\r
                                           &Register\r
                                           );\r
-\r
-          PreprocessController (\r
-            PciDevice,\r
-            PciDevice->BusNumber,\r
-            PciDevice->DeviceNumber,\r
-            PciDevice->FunctionNumber,\r
-            EfiPciBeforeChildBusEnumeration\r
-            );\r
-\r
-          DEBUG((EFI_D_ERROR, "Scan  PPB(%02d,%02d,%02d)\n", PciDevice->BusNumber, PciDevice->DeviceNumber,PciDevice->FunctionNumber ));\r
-          Status = PciScanBus (\r
-                    PciDevice,\r
-                    (UINT8) (SecondBus),\r
-                    SubBusNumber,\r
-                    PaddedBusRange\r
-                    );\r
-\r
-          if (EFI_ERROR (Status)) {\r
-            return EFI_DEVICE_ERROR;\r
+        \r
+          //\r
+          // Initialize SubBusNumber to SecondBus\r
+          //\r
+          Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
+          Status = PciRootBridgeIoWrite (\r
+                                          PciRootBridgeIo,\r
+                                          &Pci,\r
+                                          EfiPciWidthUint8,\r
+                                          Address,\r
+                                          1,\r
+                                          SubBusNumber\r
+                                          );\r
+          //\r
+          // If it is PPB, resursively search down this bridge\r
+          //\r
+          if (IS_PCI_BRIDGE (&Pci)) {\r
+            //\r
+            // Temporarily initialize SubBusNumber to maximum bus number to ensure the\r
+            // PCI configuration transaction to go through any PPB\r
+            //\r
+            Address   = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
+            Register  = 0xFF;\r
+            Status = PciRootBridgeIoWrite (\r
+                                            PciRootBridgeIo,\r
+                                            &Pci,\r
+                                            EfiPciWidthUint8,\r
+                                            Address,\r
+                                            1,\r
+                                            &Register\r
+                                            );\r
+        \r
+            PreprocessController (\r
+              PciDevice,\r
+              PciDevice->BusNumber,\r
+              PciDevice->DeviceNumber,\r
+              PciDevice->FunctionNumber,\r
+              EfiPciBeforeChildBusEnumeration\r
+              );\r
+        \r
+            DEBUG((EFI_D_ERROR, "Scan  PPB(%02d,%02d,%02d)\n", PciDevice->BusNumber, PciDevice->DeviceNumber,PciDevice->FunctionNumber ));\r
+            Status = PciScanBus (\r
+                      PciDevice,\r
+                      (UINT8) (SecondBus),\r
+                      SubBusNumber,\r
+                      PaddedBusRange\r
+                      );\r
+        \r
+            if (EFI_ERROR (Status)) {\r
+              return EFI_DEVICE_ERROR;\r
+            }\r
           }\r
+        \r
+          //\r
+          // Set the current maximum bus number under the PPB\r
+          //\r
+        \r
+          Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
+        \r
+          Status = PciRootBridgeIoWrite (\r
+                                          PciRootBridgeIo,\r
+                                          &Pci,\r
+                                          EfiPciWidthUint8,\r
+                                          Address,\r
+                                          1,\r
+                                          SubBusNumber\r
+                                          );\r
+        \r
         }\r
-\r
-        //\r
-        // Set the current maximum bus number under the PPB\r
-        //\r
-\r
-        Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
-\r
-        Status = PciRootBridgeIoWrite (\r
-                                        PciRootBridgeIo,\r
-                                        &Pci,\r
-                                        EfiPciWidthUint8,\r
-                                        Address,\r
-                                        1,\r
-                                        SubBusNumber\r
-                                        );\r
-\r
       }\r
-\r
       if (Func == 0 && !IS_PCI_MULTI_FUNC (&Pci)) {\r
 \r
         //\r