[syslinux:lwip] pxe: be more verbose on unload failure

syslinux-bot for H. Peter Anvin hpa at zytor.com
Fri May 13 15:03:18 PDT 2011


Commit-ID:  855c51a1abaa96559e8c9dffdb922f4dad623e20
Gitweb:     http://syslinux.zytor.com/commit/855c51a1abaa96559e8c9dffdb922f4dad623e20
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 13 May 2011 15:00:08 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 13 May 2011 15:00:37 -0700

pxe: be more verbose on unload failure

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/fs/pxe/isr.c |    4 ++++
 core/fs/pxe/pxe.c |   10 ++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/core/fs/pxe/isr.c b/core/fs/pxe/isr.c
index a476b7d..1528724 100644
--- a/core/fs/pxe/isr.c
+++ b/core/fs/pxe/isr.c
@@ -206,6 +206,10 @@ int reset_pxe(void)
 
     memset(&undi_close, 0, sizeof(undi_close));
     pxe_call(PXENV_UNDI_CLOSE, &undi_close);
+
+    if (undi_close.Status)
+	printf("PXENV_UNDI_CLOSE failed: 0x%x\n", undi_close.Status);
+
     if (pxe_undi_info.IntNumber)
 	uninstall_irq_vector(pxe_undi_info.IntNumber, pxe_isr, &pxe_irq_chain);
     if (poll_thread)
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index e553d8c..b743cfb 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -1011,6 +1011,12 @@ static void install_int18_hack(void)
 void unload_pxe(void)
 {
     /* PXE unload sequences */
+    /*
+     * iPXE does:
+     * UNDI_SHUTDOWN, UNDI_CLEANUP, STOP_UNDI
+     * Older Syslinux did:
+     * UDP_CLOSE, UNDI_SHUTDOWN, UNLOAD_STACK, STOP_UNDI/UNDI_CLEANUP
+     */
     static const uint8_t new_api_unload[] = {
 	PXENV_UNDI_SHUTDOWN, PXENV_UNLOAD_STACK, PXENV_STOP_UNDI, 0
     };
@@ -1048,8 +1054,8 @@ void unload_pxe(void)
 	memset(&unload_call, 0, sizeof unload_call);
 	err = pxe_call(api, &unload_call);
 	if (err || unload_call.Status != PXENV_STATUS_SUCCESS) {
-	    dprintf("PXE unload API call %04x failed: 0x%x\n",
-		     api, unload_call.Status);
+	    printf("PXE unload API call %04x failed: 0x%x\n",
+		   api, unload_call.Status);
 	    goto cant_free;
 	}
     }



More information about the Syslinux-commits mailing list