So due the usb hot plug feature, we should always connect USB host controller according to the consolein device provided by PlatformData file before entering frontpage. This way can avoid usb device can not work in frontpage phase.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9207
6f19259b-4bc3-4df7-8a09-
765794883524
\r
SetDevicePathEndNode (Next);\r
//\r
\r
SetDevicePathEndNode (Next);\r
//\r
- // Connect the instance device path\r
+ // Check USB1.1 console\r
- Status = BdsLibConnectDevicePath (Instance);\r
- if (EFI_ERROR (Status)) {\r
+ if ((DevicePathType (Instance) == MESSAGING_DEVICE_PATH) &&\r
+ ((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)\r
+ || (DevicePathSubType (Instance) == MSG_USB_WWID_DP)\r
+ )) {\r
- // Delete the instance from the console varialbe\r
+ // Check the Usb console in Usb2.0 bus firstly, then Usb1.1 bus\r
- BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);\r
+ Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_EHCI, Instance);\r
+ if (!EFI_ERROR (Status)) {\r
+ DeviceExist = TRUE;\r
+ }\r
+\r
+ Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_UHCI, Instance);\r
+ if (!EFI_ERROR (Status)) {\r
+ DeviceExist = TRUE;\r
+ }\r
+ //\r
+ // Connect the instance device path\r
+ //\r
+ Status = BdsLibConnectDevicePath (Instance);\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // Delete the instance from the console varialbe\r
+ //\r
+ BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);\r
+ } else {\r
+ DeviceExist = TRUE;\r
+ }\r
}\r
FreePool(Instance);\r
} while (CopyOfDevicePath != NULL);\r
}\r
FreePool(Instance);\r
} while (CopyOfDevicePath != NULL);\r