summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c b/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c
index d4a263b8fe..d1fb0f72ba 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c
@@ -52,7 +52,6 @@ BmConnectAllDriversToAllControllers (
// the connect again.
//
Status = gDS->Dispatch ();
-
} while (!EFI_ERROR (Status));
}
@@ -154,7 +153,6 @@ EfiBootManagerConnectDevicePath (
}
}
-
if (!EFI_ERROR (Status)) {
PreviousHandle = Handle;
//
@@ -175,11 +173,13 @@ EfiBootManagerConnectDevicePath (
if (Status == EFI_NOT_FOUND) {
Status = EFI_SUCCESS;
}
+
if (MatchingHandle != NULL) {
*MatchingHandle = Handle;
}
}
}
+
//
// Loop until RemainingDevicePath is an empty device path
//
@@ -243,16 +243,16 @@ EfiBootManagerDisconnectAll (
**/
EFI_STATUS
BmConnectUsbShortFormDevicePath (
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
{
- EFI_STATUS Status;
- EFI_HANDLE *Handles;
- UINTN HandleCount;
- UINTN Index;
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINT8 Class[3];
- BOOLEAN AtLeastOneConnected;
+ EFI_STATUS Status;
+ EFI_HANDLE *Handles;
+ UINTN HandleCount;
+ UINTN Index;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ UINT8 Class[3];
+ BOOLEAN AtLeastOneConnected;
//
// Check the passed in parameters
@@ -263,7 +263,8 @@ BmConnectUsbShortFormDevicePath (
if ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||
((DevicePathSubType (DevicePath) != MSG_USB_CLASS_DP) && (DevicePathSubType (DevicePath) != MSG_USB_WWID_DP))
- ) {
+ )
+ {
return EFI_INVALID_PARAMETER;
}
@@ -271,19 +272,19 @@ BmConnectUsbShortFormDevicePath (
// Find the usb host controller firstly, then connect with the remaining device path
//
AtLeastOneConnected = FALSE;
- Status = gBS->LocateHandleBuffer (
- ByProtocol,
- &gEfiPciIoProtocolGuid,
- NULL,
- &HandleCount,
- &Handles
- );
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+ &gEfiPciIoProtocolGuid,
+ NULL,
+ &HandleCount,
+ &Handles
+ );
if (!EFI_ERROR (Status)) {
for (Index = 0; Index < HandleCount; Index++) {
Status = gBS->HandleProtocol (
Handles[Index],
&gEfiPciIoProtocolGuid,
- (VOID **) &PciIo
+ (VOID **)&PciIo
);
if (!EFI_ERROR (Status)) {
//
@@ -292,14 +293,15 @@ BmConnectUsbShortFormDevicePath (
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class);
if (!EFI_ERROR (Status) &&
((PCI_CLASS_SERIAL == Class[2]) && (PCI_CLASS_SERIAL_USB == Class[1]))
- ) {
+ )
+ {
Status = gBS->ConnectController (
Handles[Index],
NULL,
DevicePath,
FALSE
);
- if (!EFI_ERROR(Status)) {
+ if (!EFI_ERROR (Status)) {
AtLeastOneConnected = TRUE;
}
}