From nobody Mon Apr 29 16:12:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90745+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90745+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1656052262863248.88378699711166; Thu, 23 Jun 2022 23:31:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iJ6dYY1788612xZ0mdyQ8hSf; Thu, 23 Jun 2022 23:31:02 -0700 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.4593.1656052261568409717 for ; Thu, 23 Jun 2022 23:31:01 -0700 X-Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25O5nPbw002630; Fri, 24 Jun 2022 06:30:53 GMT X-Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3gw7f08ceu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jun 2022 06:30:53 +0000 X-Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14879.it.hpe.com (Postfix) with ESMTPS id 4A192217FEC; Fri, 24 Jun 2022 06:08:27 +0000 (UTC) X-Received: from KIDKMZDU3U.asiapacific.hpqcorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id D8AC280C234; Fri, 24 Jun 2022 06:08:24 +0000 (UTC) From: "Li, Walon" To: devel@edk2.groups.io Cc: walon.li@hpe.com, nickle.wang@hpe.com, gaoliming@byosoft.com.cn Subject: [edk2-devel] [PATCH] MdeModulePkg/SetupBrowserDxe:Follow spec'd way to reconnect driver Date: Fri, 24 Jun 2022 14:07:47 +0800 Message-Id: <20220624060747.1800-1-walon.li@hpe.com> X-Proofpoint-ORIG-GUID: HvzTIcJ7fGPBO-Aaci3PfDbmEtjnGupx X-Proofpoint-GUID: HvzTIcJ7fGPBO-Aaci3PfDbmEtjnGupx X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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: 93Jm9i259gziKBxP1lIWQYgMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1656052262; bh=q+xjAQxW5LY+UBFDAyn4iPK7HsP2n6O4/lzH3NVwzWo=; h=Cc:Date:From:Reply-To:Subject:To; b=KmX706sLLvVOTokRBpW+L19wvM5YkG+ZhL2JmCTQiKgB/H0q9pfufNspEbQkzDYUnT4 dmBKhorx1+26GK3QaTisMN0g8eKPl/q4XFzfS0VTI20zXtb5KVtqCStoMYrwRrbZVXKfA vEckkorcfrFz1dKrBhsOAUTnVGt3hFgqlys= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656052263066100001 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3952 In UEFI spec, it defines reconnect timing that will be activated upon exiting of the formset or the browser. However, we did't use this kind of way to check reconnect conditioncode. Code only blocks reconnect if page is updated dynamically. That's not matched spec'd way. We should check current formset whether is exiting, then reconnect driver. Signed-off-by: Walon Li --- MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 4 +--- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeMod= ulePkg/Universal/SetupBrowserDxe/Presentation.c index 9587b08d6d..babef21497 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -2,7 +2,7 @@ Utility functions for UI presentation. =20 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP
+(C) Copyright 2015 - 2022 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -21,7 +21,6 @@ LIST_ENTRY mRefreshEventList =3D INITIALI= ZE_LIST_HEAD_VARIABLE (mR UINT16 mCurFakeQestId; FORM_DISPLAY_ENGINE_FORM gDisplayFormData; BOOLEAN mFinishRetrieveCall =3D FALSE; -BOOLEAN mDynamicFormUpdated =3D FALSE; =20 /** Check whether the ConfigAccess protocol is available. @@ -1791,7 +1790,6 @@ 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 fe0d46d93f..5158baf5bd 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2,7 +2,7 @@ Entry and initialization module for the browser. =20 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
-(C) Copyright 2020 Hewlett Packard Enterprise Development LP
+(C) Copyright 2020 - 2022 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -68,7 +68,6 @@ 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 @@ -539,7 +538,6 @@ SendForm ( =20 Selection->FormSet =3D FormSet; mSystemLevelFormSet =3D FormSet; - mDynamicFormUpdated =3D FALSE; =20 // // Display this formset @@ -552,10 +550,9 @@ SendForm ( mSystemLevelFormSet =3D NULL; =20 // - // If callback update form dynamically, it's not exiting of the form= set for user so system do not reconnect driver hanlde - // this time. + // Check incoming formset whether is same with previous. If yes, tha= t means action is not exiting of formset so do not reconnect controller. // - if (!mDynamicFormUpdated && (gFlagReconnect || gCallbackReconnect)) { + if ((gFlagReconnect || gCallbackReconnect) && !CompareGuid (&FormSet= ->Guid, &Selection->FormSetGuid)) { 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 (#90745): https://edk2.groups.io/g/devel/message/90745 Mute This Topic: https://groups.io/mt/91959696/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-