From nobody Sun Feb 8 14:27:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59944+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59944+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1589964130; cv=none; d=zohomail.com; s=zohoarc; b=htucVsLhqn0Xx7FSY7dWMsyfC5VdX/rBV7fI9hKPjlTvdBaZuKKxkHy1w/oFx1cadg8xPVPz8QAgqo0a2u9s8KSLuT+S9dU3coJO1+LAh/KmLY+fbfFHVO0neJtYfQM4dBh2nX92SmiUChK2RO12KutPfOLN1mQe09Z6LEC2RaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589964130; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=9vyYWL/9RccS4YqjNQp279H9sFaal+TqUa08GENzM+U=; b=VpGtFIjkCXLoyufZ9WAC/2ozCiGxcMo0GjOmvF6RZeiZJK1PmK8E5pctHvEyHPlUwRE33V4YGib1ybsKfLLmN76qOkcLcFND22nKfXjfrjUq55nkJXDIvgPlSMbmg0sRtLWShIdH0tSYP7yHfjlSqd5CP+587rGsibcYCilSsi4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59944+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589964130634571.37898420489; Wed, 20 May 2020 01:42:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IyziYY1788612xGuNs8qFg0k; Wed, 20 May 2020 01:42:10 -0700 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.6759.1589948730719907733 for ; Tue, 19 May 2020 21:25:30 -0700 X-Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04K45NJe030443; Wed, 20 May 2020 04:25:30 GMT X-Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0a-002e3701.pphosted.com with ESMTP id 314qjja46s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 May 2020 04:25:30 +0000 X-Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 9B11F60; Wed, 20 May 2020 04:25:29 +0000 (UTC) X-Received: from KIDKMZDU3U.asiapacific.hpqcorp.net (unknown [16.169.8.12]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id CA8BC50; Wed, 20 May 2020 04:25:27 +0000 (UTC) From: "Li, Walon" To: devel@edk2.groups.io Cc: walon.li@hpe.com, dandan.bi@intel.com, nickle.wang@hpe.com, abner.chang@hpe.com, sunnywang@hpe.com Subject: [edk2-devel] [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update Date: Wed, 20 May 2020 12:24:47 +0800 Message-Id: <20200520042447.1017-1-walon.li@hpe.com> X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,walon.li@hpe.com X-Gm-Message-State: iAAmsMaMgqkMV7RDcjXw5rGtx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589964130; bh=9j7hgcbfhFbYc+4uL+05nEKakbS+6b5xn7VanfwucSg=; h=Cc:Date:From:Reply-To:Subject:To; b=mWl6zvanJyrQ2Oen5neMDfNMgLYOs7E9dlVGfg1mCAkbl5mapxjp6RitUCHc6v3FC/G 4uSAWsbnxY3CXGtO9wEZbQFS4nFak9X8jgzt3Fo9xRFAN33bQOLHfLjdTcekiGWvyt46o spus9V5squlBYCG6H+bVdnF0ciKQ8IM7Nhs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2701 Recording to the spec, the reconnect is activated upon exiting of the formset or the browser. Exiting is by user but form-browser internal logic. That means the reconnection is only happened when user press ESC or _EXIT action to exit form. Driver callback may update HII form dynamically so form-browser needs to refresh its internal data. It's not exiting formset for user exactly and they didn't know what happened. So use a flag to record that and do not reconnect driver if updated by callback. Signed-off-by: Walon Li Reviewed-by: Dandan Bi --- MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 2 ++ MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeMod= ulePkg/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 =3D INITIALIZE_LIST_= HEAD_VARIABLE (mRefreshEv UINT16 mCurFakeQestId; FORM_DISPLAY_ENGINE_FORM gDisplayFormData; BOOLEAN mFinishRetrieveCall =3D FALSE; +BOOLEAN mDynamicFormUpdated =3D FALSE; =20 /** Check whether the ConfigAccess protocol is available. @@ -1762,6 +1763,7 @@ FormUpdateNotify ( ) { mHiiPackageListUpdated =3D TRUE; + mDynamicFormUpdated =3D TRUE; =20 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; =20 /** Create a menu with specified formset GUID and form ID, and add it as a c= hild @@ -536,6 +537,7 @@ SendForm ( } Selection->FormSet =3D FormSet; mSystemLevelFormSet =3D FormSet; + mDynamicFormUpdated =3D FALSE; =20 // // Display this formset @@ -547,7 +549,11 @@ SendForm ( gCurrentSelection =3D NULL; mSystemLevelFormSet =3D NULL; =20 - if (gFlagReconnect || gCallbackReconnect) { + // + // If callback update form dynamically, it's not exiting of the form= set for user so system do not reconnect driver hanlde + // this time. + // + if (!mDynamicFormUpdated && (gFlagReconnect || gCallbackReconnect)) { RetVal =3D ReconnectController (FormSet->DriverHandle); if (!RetVal) { PopupErrorMessage(BROWSER_RECONNECT_FAIL, NULL, NULL, NULL); --=20 2.23.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59944): https://edk2.groups.io/g/devel/message/59944 Mute This Topic: https://groups.io/mt/74345701/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-