From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ld+S+Zjs; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0174ed4f6d=walon.li@hpe.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pps0720; bh=oS0I/nrh5OVFgt/nXSUnRr5Z17FqSLvRydYxmnVcqTk=; b=ld+S+ZjsSGMv5QWpOK2OcE5HiQNtoxGmhqc5yN38xtIV8SaJ2A3UOJWCN1etE2Ac2W1s ejBOXzQPT6j/VNH6hksnuf1ZQ7GOLF979AhdYB6X9Pb6WGW8t+RQLF1F9rins5sKMLzg vv5L3j7EVFLVjaJ3xE5G0QijTs8blOfHWJFqPbpliHUavWNKjF8HOUfUhw2fIUP0BjLs 7nrLQ+zAKg/eNE1bV2AKnEuiNI4GA9ccdpNJhUrTp6E25RNZn7ZBh+qaukRZmfCBXqpr aJlWy925U8EKrzxgAwt/iYNJ7pNxP/pdhWTh47KxOjdoKqXvBvrsdM7ZhRJs0FFtV9iq 7Q== 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 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) 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: [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-Mailer: git-send-email 2.23.0.windows.1 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 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-24_04,2022-06-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=607 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206240023 Content-Transfer-Encoding: quoted-printable 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.=0D =0D Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
=0D -(C) Copyright 2015 Hewlett Packard Enterprise Development LP
=0D +(C) Copyright 2015 - 2022 Hewlett Packard Enterprise Development LP
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -21,7 +21,6 @@ LIST_ENTRY mRefreshEventList =3D INITIALI= ZE_LIST_HEAD_VARIABLE (mR UINT16 mCurFakeQestId;=0D FORM_DISPLAY_ENGINE_FORM gDisplayFormData;=0D BOOLEAN mFinishRetrieveCall =3D FALSE;=0D -BOOLEAN mDynamicFormUpdated =3D FALSE;=0D =0D /**=0D Check whether the ConfigAccess protocol is available.=0D @@ -1791,7 +1790,6 @@ FormUpdateNotify ( )=0D {=0D mHiiPackageListUpdated =3D TRUE;=0D - mDynamicFormUpdated =3D TRUE;=0D =0D return EFI_SUCCESS;=0D }=0D 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.=0D =0D Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
=0D -(C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D +(C) Copyright 2020 - 2022 Hewlett Packard Enterprise Development LP
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -68,7 +68,6 @@ extern EFI_GUID mCurrentFormSetGuid; extern EFI_HII_HANDLE mCurrentHiiHandle;=0D extern UINT16 mCurrentFormId;=0D extern FORM_DISPLAY_ENGINE_FORM gDisplayFormData;=0D -extern BOOLEAN mDynamicFormUpdated;=0D =0D /**=0D Create a menu with specified formset GUID and form ID, and add it as a c= hild=0D @@ -539,7 +538,6 @@ SendForm ( =0D Selection->FormSet =3D FormSet;=0D mSystemLevelFormSet =3D FormSet;=0D - mDynamicFormUpdated =3D FALSE;=0D =0D //=0D // Display this formset=0D @@ -552,10 +550,9 @@ SendForm ( mSystemLevelFormSet =3D NULL;=0D =0D //=0D - // If callback update form dynamically, it's not exiting of the form= set for user so system do not reconnect driver hanlde=0D - // this time.=0D + // Check incoming formset whether is same with previous. If yes, tha= t means action is not exiting of formset so do not reconnect controller.=0D //=0D - if (!mDynamicFormUpdated && (gFlagReconnect || gCallbackReconnect)) = {=0D + if ((gFlagReconnect || gCallbackReconnect) && !CompareGuid (&FormSet= ->Guid, &Selection->FormSetGuid)) {=0D RetVal =3D ReconnectController (FormSet->DriverHandle);=0D if (!RetVal) {=0D PopupErrorMessage (BROWSER_RECONNECT_FAIL, NULL, NULL, NULL);=0D --=20 2.23.0.windows.1