From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 1/3] NetworkPkg/UefiPxeBcDxe: Fix Pxe.Dhcp() return status code.
Date: Thu, 14 Dec 2017 13:50:05 +0800 [thread overview]
Message-ID: <1513230607-1832-2-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1513230607-1832-1-git-send-email-jiaxin.wu@intel.com>
According UEFI Spec, if valid PXE offer is not received, Pxe.Dhcp()
should return EFI_NO_RESPONSE, but currently, EFI_TIMEOUT is returned
from Pxe.Dhcp().
This patch is to fix the above issue.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 2 +-
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
index fc50a82..0bb1d66 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
@@ -1240,11 +1240,11 @@ ON_EXIT:
} else if (Status == EFI_OUT_OF_RESOURCES) {
AsciiPrint ("\n PXE-E09: Could not allocate I/O buffers.\n");
} else if (Status == EFI_NO_MEDIA) {
AsciiPrint ("\n PXE-E12: Could not detect network connection.\n");
} else if (Status == EFI_NO_RESPONSE) {
- AsciiPrint ("\n PXE-E16: No offer received.\n");
+ AsciiPrint ("\n PXE-E16: No valid offer received.\n");
} else if (Status == EFI_TIMEOUT) {
AsciiPrint ("\n PXE-E18: Server response timeout.\n");
} else if (Status == EFI_ABORTED) {
AsciiPrint ("\n PXE-E21: Remote boot cancelled.\n");
} else if (Status == EFI_ICMP_ERROR) {
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
index 97829e9..101c658 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
@@ -1705,10 +1705,15 @@ PxeBcDhcp4Dora (
Status = Dhcp4->Start (Dhcp4, NULL);
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
if (Status == EFI_ICMP_ERROR) {
PxeMode->IcmpErrorReceived = TRUE;
}
+
+ if (Status == EFI_TIMEOUT && Private->OfferNum > 0) {
+ Status = EFI_NO_RESPONSE;
+ }
+
goto ON_EXIT;
}
//
// Get the acquired IPv4 address and store them.
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2017-12-14 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 5:50 [Patch 0/3] Fix the series issues in UefiPxeBcDxe Jiaxin Wu
2017-12-14 5:50 ` Jiaxin Wu [this message]
2017-12-14 5:50 ` [Patch 2/3] NetworkPkg/UefiPxeBcDxe: Correct the handle for PXE Base Code Callback Protocol Jiaxin Wu
2017-12-14 5:50 ` [Patch 3/3] NetworkPkg/UefiPxeBcDxe: Allow the NULL configuration for NewStationIP/NewSubnetMask Jiaxin Wu
2017-12-14 5:52 ` [Patch 0/3] Fix the series issues in UefiPxeBcDxe Wu, Jiaxin
2017-12-14 6:06 ` Fu, Siyuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513230607-1832-2-git-send-email-jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox