]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.c
index 82067b541c9dafc66e2a16f09ea5f7d24d3218ad..f936a4b8e8b667e2a3ce576eefac432516642b1a 100644 (file)
@@ -68,6 +68,7 @@ extern EFI_GUID        mCurrentFormSetGuid;
 extern EFI_HII_HANDLE  mCurrentHiiHandle;\r
 extern UINT16          mCurrentFormId;\r
 extern FORM_DISPLAY_ENGINE_FORM gDisplayFormData;\r
+extern BOOLEAN         mDynamicFormUpdated;\r
 \r
 /**\r
   Create a menu with specified formset GUID and form ID, and add it as a child\r
@@ -536,6 +537,7 @@ SendForm (
       }\r
       Selection->FormSet = FormSet;\r
       mSystemLevelFormSet = FormSet;\r
+      mDynamicFormUpdated = FALSE;\r
 \r
       //\r
       // Display this formset\r
@@ -547,7 +549,11 @@ SendForm (
       gCurrentSelection = NULL;\r
       mSystemLevelFormSet = NULL;\r
 \r
-      if (gFlagReconnect || gCallbackReconnect) {\r
+      //\r
+      // If callback update form dynamically, it's not exiting of the formset for user so system do not reconnect driver hanlde\r
+      // this time.\r
+      //\r
+      if (!mDynamicFormUpdated && (gFlagReconnect || gCallbackReconnect)) {\r
         RetVal = ReconnectController (FormSet->DriverHandle);\r
         if (!RetVal) {\r
           PopupErrorMessage(BROWSER_RECONNECT_FAIL, NULL, NULL, NULL);\r