diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index bafee4c612..7f85873730 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -19,6 +19,7 @@ LIST_ENTRY mRefreshEventList = INITIALIZE_LIST_HEAD_VARIABLE (mRefreshEv UINT16 mCurFakeQestId; FORM_DISPLAY_ENGINE_FORM gDisplayFormData; BOOLEAN mFinishRetrieveCall = FALSE; +BOOLEAN mDynamicFormUpdated = FALSE; /** Check whether the ConfigAccess protocol is available. @@ -1762,6 +1763,7 @@ FormUpdateNotify ( ) { mHiiPackageListUpdated = TRUE; + mDynamicFormUpdated = TRUE; return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 82067b541c..f936a4b8e8 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -68,6 +68,7 @@ extern EFI_GUID mCurrentFormSetGuid; extern EFI_HII_HANDLE mCurrentHiiHandle; extern UINT16 mCurrentFormId; extern FORM_DISPLAY_ENGINE_FORM gDisplayFormData; +extern BOOLEAN mDynamicFormUpdated; /** Create a menu with specified formset GUID and form ID, and add it as a child @@ -536,6 +537,7 @@ SendForm ( } Selection->FormSet = FormSet; mSystemLevelFormSet = FormSet; + mDynamicFormUpdated = FALSE; // // Display this formset @@ -547,7 +549,11 @@ SendForm ( gCurrentSelection = NULL; mSystemLevelFormSet = NULL; - if (gFlagReconnect || gCallbackReconnect) { + // + // If callback update form dynamically, it's not exiting of the formset for user so system do not reconnect driver hanlde + // this time. + // + if (!mDynamicFormUpdated && (gFlagReconnect || gCallbackReconnect)) { RetVal = ReconnectController (FormSet->DriverHandle); if (!RetVal) { PopupErrorMessage(BROWSER_RECONNECT_FAIL, NULL, NULL, NULL);