[syslinux:lwip] core: pxe: Cleanup properly when using undi.

syslinux-bot for Eric W. Biederman ebiederm at xmission.com
Fri Apr 22 20:06:07 PDT 2011


Commit-ID:  787ca77736848e5d3967e5823d009cfe1ddcb833
Gitweb:     http://syslinux.zytor.com/commit/787ca77736848e5d3967e5823d009cfe1ddcb833
Author:     Eric W. Biederman <ebiederm at xmission.com>
AuthorDate: Mon, 11 Apr 2011 23:02:11 -0700
Committer:  Eric W. Biederman <ebiederm at xmission.com>
CommitDate: Tue, 12 Apr 2011 14:41:24 -0700

core: pxe: Cleanup properly when using undi.

Unhook the interrupt handler and stop the undi processing to
make it save to exit, and allows unload_pxe to start succeeding
again.

Signed-off-by: Eric W. Biederman <ebiederm at xmission.com>


---
 core/fs/pxe/pxe.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 96c6e7b..50f205f 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -1420,6 +1420,8 @@ void unload_pxe(void)
 	uint16_t Status;	/* All calls have this as the first member */
     } unload_call;
 
+    pxe_cleanup_isr();
+
     dprintf("FBM before unload = %d\n", BIOS_fbm);
 
     err = reset_pxe();
@@ -1438,7 +1440,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\n", api);
+	    dprintf("PXE unload API call %04x failed: 0x%x\n",
+		     api, unload_call.Status);
 	    goto cant_free;
 	}
     }



More information about the Syslinux-commits mailing list