Thanks Ting for the feedback,
what about this new version (see attached patch)
Best Regards,
Olivier
________________________________________
From: Ye, Ting [ting...@intel.com]
Sent: 30 January 2013 07:51
To: edk2-devel@lists.sourceforge.net; Tian, Feng
Subject: Re: [edk2] [PATCH] MdeModulePkg/MnpDxe: Checked returned value of
Snp->GetStatus()
Olivier,
I don’t agree with this patch for the same reason. It is correct that upon a
successful return of Snp->GetStatus(), Snp->Mode->MediaPresent will be updated
to reflect current media status. But if this call meets error in some
conditions, even though the media status is not updated to latest, we still
need return SnpMode to the caller of MnpGetModeData since there are other
useful parameters caller may be interested.
Best Regards,
Ting
From: Olivier Martin [mailto:olivier.mar...@arm.com]
Sent: Friday, January 25, 2013 9:05 PM
To: Tian, Feng
Cc: edk2-devel@lists.sourceforge.net
Subject: [edk2] [PATCH] MdeModulePkg/MnpDxe: Checked returned value of
Snp->GetStatus()
Dear MdeModulePkg maintainer,
Please find the attached patch that checked the returned value of
Snp->GetStatus() as explicitly said by the existing comment.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin
<olivier.mar...@arm.com<mailto:olivier.mar...@arm.com>>
Best Regards,
Olivier
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
From 8c7ea2bb6a2bb99cfc15d49291a994ae7114902d Mon Sep 17 00:00:00 2001
From: Olivier Martin <olivier.mar...@arm.com>
Date: Thu, 10 Jan 2013 11:37:12 +0000
Subject: [PATCH 1/2] MdeModulePkg/MnpDxe: Returned the value of Snp->GetStatus on error
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.mar...@arm.com>
---
MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
index 4c0f3dd..7a2a174 100644
--- a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
+++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
@@ -79,14 +79,19 @@ MnpGetModeData (
// Upon successful return of GetStatus(), the Snp->Mode->MediaPresent
// will be updated to reflect any change of media status
//
- Snp->GetStatus (Snp, &InterruptStatus, NULL);
+ Status = Snp->GetStatus (Snp, &InterruptStatus, NULL);
CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));
+ } else {
+ Status = EFI_SUCCESS;
}
- if (!Instance->Configured) {
- Status = EFI_NOT_STARTED;
- } else {
- Status = EFI_SUCCESS;
+ if (!EFI_ERROR (Status)) {
+ if (!Instance->Configured) {
+ Status = EFI_NOT_STARTED;
+ } else {
+ ASSERT (Status == EFI_SUCCESS);
+ Status = EFI_SUCCESS;
+ }
}
gBS->RestoreTPL (OldTpl);
--
1.7.5.4
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel