* [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
@ 2020-05-20 4:24 Li, Walon
2020-05-24 7:17 ` Dandan Bi
0 siblings, 1 reply; 6+ messages in thread
From: Li, Walon @ 2020-05-20 4:24 UTC (permalink / raw)
To: devel; +Cc: walon.li, dandan.bi, nickle.wang, abner.chang, sunnywang
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2701
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 <walon.li@hpe.com>
---
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/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);
--
2.23.0.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
2020-05-20 4:24 [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update Li, Walon
@ 2020-05-24 7:17 ` Dandan Bi
2020-06-03 10:55 ` Li, Walon
0 siblings, 1 reply; 6+ messages in thread
From: Dandan Bi @ 2020-05-24 7:17 UTC (permalink / raw)
To: Walon Li, devel@edk2.groups.io
Cc: nickle.wang@hpe.com, abner.chang@hpe.com, sunnywang@hpe.com
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Thanks,
Dandan
> -----Original Message-----
> From: Walon Li <walon.li@hpe.com>
> Sent: Wednesday, May 20, 2020 12:25 PM
> To: devel@edk2.groups.io
> Cc: walon.li@hpe.com; Bi, Dandan <dandan.bi@intel.com>;
> nickle.wang@hpe.com; abner.chang@hpe.com; sunnywang@hpe.com
> Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver with form-update
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2701
>
> 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 <walon.li@hpe.com>
> ---
> 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/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);--
> 2.23.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
2020-05-24 7:17 ` Dandan Bi
@ 2020-06-03 10:55 ` Li, Walon
2020-06-08 7:16 ` Dandan Bi
0 siblings, 1 reply; 6+ messages in thread
From: Li, Walon @ 2020-06-03 10:55 UTC (permalink / raw)
To: Bi, Dandan, devel@edk2.groups.io, liming.gao@intel.com
Cc: Wang, Nickle (HPS SW), Chang, Abner (HPS SW/FW Technologist),
Wang, Sunny (HPS SW)
May I know the schedule of pushing this change to edk2-master? Or what's next step I should do?
Thanks,
Walon
-----Original Message-----
From: Bi, Dandan [mailto:dandan.bi@intel.com]
Sent: Sunday, May 24, 2020 3:17 PM
To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW) <sunnywang@hpe.com>
Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Thanks,
Dandan
> -----Original Message-----
> From: Walon Li <walon.li@hpe.com>
> Sent: Wednesday, May 20, 2020 12:25 PM
> To: devel@edk2.groups.io
> Cc: walon.li@hpe.com; Bi, Dandan <dandan.bi@intel.com>;
> nickle.wang@hpe.com; abner.chang@hpe.com; sunnywang@hpe.com
> Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver
> with form-update
>
> REF:INVALID URI REMOVED
> ocore.org_show-5Fbug.cgi-3Fid-3D2701&d=DwIFAg&c=C5b8zRQO1miGmBeVZ2LFWg
> &r=nGx4G_nX3rQG_ai3uSb52w&m=j34dsoHyXFEvnpFmkT_iUSnMAF1kWbmBFnMbHVJkJx
> U&s=V7D879dizWzD8-fTk-wXmw5sypK5jfdtjWAENVbXntQ&e=
>
> 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 <walon.li@hpe.com>
> ---
> 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/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);--
> 2.23.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
2020-06-03 10:55 ` Li, Walon
@ 2020-06-08 7:16 ` Dandan Bi
2020-06-10 5:32 ` Dandan Bi
0 siblings, 1 reply; 6+ messages in thread
From: Dandan Bi @ 2020-06-08 7:16 UTC (permalink / raw)
To: Li, Walon, devel@edk2.groups.io, Gao, Liming
Cc: Wang, Nickle (HPS SW), Chang, Abner (HPS SW/FW Technologist),
Wang, Sunny (HPS SW), Dong, Eric, Wang, Jian J, Wu, Hao A
Hi All,
Is there any concern for this patch?
I will push this patch tomorrow if don't get any objection?
Thanks,
Dandan
> -----Original Message-----
> From: Li, Walon <walon.li@hpe.com>
> Sent: Wednesday, June 3, 2020 6:56 PM
> To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io; Gao, Liming
> <liming.gao@intel.com>
> Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> <sunnywang@hpe.com>
> Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver with form-update
>
> May I know the schedule of pushing this change to edk2-master? Or what's
> next step I should do?
>
> Thanks,
> Walon
> -----Original Message-----
> From: Bi, Dandan [mailto:dandan.bi@intel.com]
> Sent: Sunday, May 24, 2020 3:17 PM
> To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
> Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> <sunnywang@hpe.com>
> Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver with form-update
>
> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
>
>
> Thanks,
> Dandan
> > -----Original Message-----
> > From: Walon Li <walon.li@hpe.com>
> > Sent: Wednesday, May 20, 2020 12:25 PM
> > To: devel@edk2.groups.io
> > Cc: walon.li@hpe.com; Bi, Dandan <dandan.bi@intel.com>;
> > nickle.wang@hpe.com; abner.chang@hpe.com; sunnywang@hpe.com
> > Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver
> > with form-update
> >
> > REF:https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.tian
> > ocore.org_show-5Fbug.cgi-3Fid-
> 3D2701&d=DwIFAg&c=C5b8zRQO1miGmBeVZ2LFWg
> >
> &r=nGx4G_nX3rQG_ai3uSb52w&m=j34dsoHyXFEvnpFmkT_iUSnMAF1kWbm
> BFnMbHVJkJx
> > U&s=V7D879dizWzD8-fTk-wXmw5sypK5jfdtjWAENVbXntQ&e=
> >
> > 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 <walon.li@hpe.com>
> > ---
> > 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/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);--
> > 2.23.0.windows.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
2020-06-08 7:16 ` Dandan Bi
@ 2020-06-10 5:32 ` Dandan Bi
2020-06-10 5:49 ` Abner Chang
0 siblings, 1 reply; 6+ messages in thread
From: Dandan Bi @ 2020-06-10 5:32 UTC (permalink / raw)
To: Li, Walon, devel@edk2.groups.io, Gao, Liming
Cc: Wang, Nickle (HPS SW), Chang, Abner (HPS SW/FW Technologist),
Wang, Sunny (HPS SW), Dong, Eric, Wang, Jian J, Wu, Hao A
This patch is committed via 365fdb0f939cf00b26d37f27adbf579aa984221b
Thanks,
Dandan
> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, June 8, 2020 3:16 PM
> To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io; Gao, Liming
> <liming.gao@intel.com>
> Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> <sunnywang@hpe.com>; Dong, Eric <eric.dong@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver with form-update
>
> Hi All,
>
> Is there any concern for this patch?
> I will push this patch tomorrow if don't get any objection?
>
>
>
> Thanks,
> Dandan
>
> > -----Original Message-----
> > From: Li, Walon <walon.li@hpe.com>
> > Sent: Wednesday, June 3, 2020 6:56 PM
> > To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io; Gao,
> > Liming <liming.gao@intel.com>
> > Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> > SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> > <sunnywang@hpe.com>
> > Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> > driver with form-update
> >
> > May I know the schedule of pushing this change to edk2-master? Or
> > what's next step I should do?
> >
> > Thanks,
> > Walon
> > -----Original Message-----
> > From: Bi, Dandan [mailto:dandan.bi@intel.com]
> > Sent: Sunday, May 24, 2020 3:17 PM
> > To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
> > Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> > SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> > <sunnywang@hpe.com>
> > Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> > driver with form-update
> >
> > Reviewed-by: Dandan Bi <dandan.bi@intel.com>
> >
> >
> > Thanks,
> > Dandan
> > > -----Original Message-----
> > > From: Walon Li <walon.li@hpe.com>
> > > Sent: Wednesday, May 20, 2020 12:25 PM
> > > To: devel@edk2.groups.io
> > > Cc: walon.li@hpe.com; Bi, Dandan <dandan.bi@intel.com>;
> > > nickle.wang@hpe.com; abner.chang@hpe.com; sunnywang@hpe.com
> > > Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> > driver
> > > with form-update
> > >
> > > REF:https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.ti
> > > an
> > > ocore.org_show-5Fbug.cgi-3Fid-
> > 3D2701&d=DwIFAg&c=C5b8zRQO1miGmBeVZ2LFWg
> > >
> >
> &r=nGx4G_nX3rQG_ai3uSb52w&m=j34dsoHyXFEvnpFmkT_iUSnMAF1kWbm
> > BFnMbHVJkJx
> > > U&s=V7D879dizWzD8-fTk-wXmw5sypK5jfdtjWAENVbXntQ&e=
> > >
> > > 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 <walon.li@hpe.com>
> > > ---
> > > 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/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);--
> > > 2.23.0.windows.1
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update
2020-06-10 5:32 ` Dandan Bi
@ 2020-06-10 5:49 ` Abner Chang
0 siblings, 0 replies; 6+ messages in thread
From: Abner Chang @ 2020-06-10 5:49 UTC (permalink / raw)
To: Bi, Dandan, Li, Walon, devel@edk2.groups.io, Gao, Liming
Cc: Wang, Nickle (HPS SW), Wang, Sunny (HPS SW), Dong, Eric,
Wang, Jian J, Wu, Hao A
Thanks Dandan.
Abner
> -----Original Message-----
> From: Bi, Dandan [mailto:dandan.bi@intel.com]
> Sent: Wednesday, June 10, 2020 1:33 PM
> To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io; Gao, Liming
> <liming.gao@intel.com>
> Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> <sunnywang@hpe.com>; Dong, Eric <eric.dong@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> driver with form-update
>
> This patch is committed via 365fdb0f939cf00b26d37f27adbf579aa984221b
>
>
> Thanks,
> Dandan
> > -----Original Message-----
> > From: Bi, Dandan
> > Sent: Monday, June 8, 2020 3:16 PM
> > To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io; Gao, Liming
> > <liming.gao@intel.com>
> > Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> > SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> > <sunnywang@hpe.com>; Dong, Eric <eric.dong@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> > Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> > driver with form-update
> >
> > Hi All,
> >
> > Is there any concern for this patch?
> > I will push this patch tomorrow if don't get any objection?
> >
> >
> >
> > Thanks,
> > Dandan
> >
> > > -----Original Message-----
> > > From: Li, Walon <walon.li@hpe.com>
> > > Sent: Wednesday, June 3, 2020 6:56 PM
> > > To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io; Gao,
> > > Liming <liming.gao@intel.com>
> > > Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> > > SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> > > <sunnywang@hpe.com>
> > > Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not
> reconnect
> > > driver with form-update
> > >
> > > May I know the schedule of pushing this change to edk2-master? Or
> > > what's next step I should do?
> > >
> > > Thanks,
> > > Walon
> > > -----Original Message-----
> > > From: Bi, Dandan [mailto:dandan.bi@intel.com]
> > > Sent: Sunday, May 24, 2020 3:17 PM
> > > To: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
> > > Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner (HPS
> > > SW/FW Technologist) <abner.chang@hpe.com>; Wang, Sunny (HPS SW)
> > > <sunnywang@hpe.com>
> > > Subject: RE: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not
> reconnect
> > > driver with form-update
> > >
> > > Reviewed-by: Dandan Bi <dandan.bi@intel.com>
> > >
> > >
> > > Thanks,
> > > Dandan
> > > > -----Original Message-----
> > > > From: Walon Li <walon.li@hpe.com>
> > > > Sent: Wednesday, May 20, 2020 12:25 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: walon.li@hpe.com; Bi, Dandan <dandan.bi@intel.com>;
> > > > nickle.wang@hpe.com; abner.chang@hpe.com; sunnywang@hpe.com
> > > > Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect
> > > driver
> > > > with form-update
> > > >
> > > > REF:INVALID URI REMOVED.
> > > > ti
> > > > an
> > > > ocore.org_show-5Fbug.cgi-3Fid-
> > > 3D2701&d=DwIFAg&c=C5b8zRQO1miGmBeVZ2LFWg
> > > >
> > >
> >
> &r=nGx4G_nX3rQG_ai3uSb52w&m=j34dsoHyXFEvnpFmkT_iUSnMAF1kWbm
> > > BFnMbHVJkJx
> > > > U&s=V7D879dizWzD8-fTk-wXmw5sypK5jfdtjWAENVbXntQ&e=
> > > >
> > > > 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 <walon.li@hpe.com>
> > > > ---
> > > > 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/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);--
> > > > 2.23.0.windows.1
> > >
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-10 5:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20 4:24 [PATCH] MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-update Li, Walon
2020-05-24 7:17 ` Dandan Bi
2020-06-03 10:55 ` Li, Walon
2020-06-08 7:16 ` Dandan Bi
2020-06-10 5:32 ` Dandan Bi
2020-06-10 5:49 ` Abner Chang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox