core: pxe: Cleanup properly when using undi.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 12 Apr 2011 06:02:11 +0000 (23:02 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 12 Apr 2011 21:41:24 +0000 (14:41 -0700)
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@xmission.com>
core/fs/pxe/pxe.c

index 96c6e7b..50f205f 100644 (file)
@@ -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;
        }
     }