// the connect again.\r
//\r
Status = gDS->Dispatch ();\r
-\r
} while (!EFI_ERROR (Status));\r
}\r
\r
}\r
}\r
\r
-\r
if (!EFI_ERROR (Status)) {\r
PreviousHandle = Handle;\r
//\r
if (Status == EFI_NOT_FOUND) {\r
Status = EFI_SUCCESS;\r
}\r
+\r
if (MatchingHandle != NULL) {\r
*MatchingHandle = Handle;\r
}\r
}\r
}\r
+\r
//\r
// Loop until RemainingDevicePath is an empty device path\r
//\r
**/\r
EFI_STATUS\r
BmConnectUsbShortFormDevicePath (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_HANDLE *Handles;\r
- UINTN HandleCount;\r
- UINTN Index;\r
- EFI_PCI_IO_PROTOCOL *PciIo;\r
- UINT8 Class[3];\r
- BOOLEAN AtLeastOneConnected;\r
+ EFI_STATUS Status;\r
+ EFI_HANDLE *Handles;\r
+ UINTN HandleCount;\r
+ UINTN Index;\r
+ EFI_PCI_IO_PROTOCOL *PciIo;\r
+ UINT8 Class[3];\r
+ BOOLEAN AtLeastOneConnected;\r
\r
//\r
// Check the passed in parameters\r
\r
if ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
((DevicePathSubType (DevicePath) != MSG_USB_CLASS_DP) && (DevicePathSubType (DevicePath) != MSG_USB_WWID_DP))\r
- ) {\r
+ )\r
+ {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
// Find the usb host controller firstly, then connect with the remaining device path\r
//\r
AtLeastOneConnected = FALSE;\r
- Status = gBS->LocateHandleBuffer (\r
- ByProtocol,\r
- &gEfiPciIoProtocolGuid,\r
- NULL,\r
- &HandleCount,\r
- &Handles\r
- );\r
+ Status = gBS->LocateHandleBuffer (\r
+ ByProtocol,\r
+ &gEfiPciIoProtocolGuid,\r
+ NULL,\r
+ &HandleCount,\r
+ &Handles\r
+ );\r
if (!EFI_ERROR (Status)) {\r
for (Index = 0; Index < HandleCount; Index++) {\r
Status = gBS->HandleProtocol (\r
Handles[Index],\r
&gEfiPciIoProtocolGuid,\r
- (VOID **) &PciIo\r
+ (VOID **)&PciIo\r
);\r
if (!EFI_ERROR (Status)) {\r
//\r
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class);\r
if (!EFI_ERROR (Status) &&\r
((PCI_CLASS_SERIAL == Class[2]) && (PCI_CLASS_SERIAL_USB == Class[1]))\r
- ) {\r
+ )\r
+ {\r
Status = gBS->ConnectController (\r
Handles[Index],\r
NULL,\r
DevicePath,\r
FALSE\r
);\r
- if (!EFI_ERROR(Status)) {\r
+ if (!EFI_ERROR (Status)) {\r
AtLeastOneConnected = TRUE;\r
}\r
}\r