Don't call PXENV_STOP_UNDI in the kpxeprefix. This slighy breaks the

clean separation between loading and starting, but does mean that more
PXE stacks survive the process.
This commit is contained in:
Michael Brown
2007-01-29 15:21:10 +00:00
parent 2cf1e33df1
commit 7d9267561b
3 changed files with 46 additions and 25 deletions

View File

@@ -605,15 +605,19 @@ int undinet_probe ( struct undi_device *undi ) {
DBGC ( undinic, "UNDINIC %p using UNDI %p\n", undinic, undi );
/* Hook in UNDI stack */
memset ( &start_undi, 0, sizeof ( start_undi ) );
start_undi.AX = undi->pci_busdevfn;
start_undi.BX = undi->isapnp_csn;
start_undi.DX = undi->isapnp_read_port;
start_undi.ES = BIOS_SEG;
start_undi.DI = find_pnp_bios();
if ( ( rc = undinet_call ( undinic, PXENV_START_UNDI, &start_undi,
sizeof ( start_undi ) ) ) != 0 )
goto err_start_undi;
if ( ! ( undi->flags & UNDI_FL_STARTED ) ) {
memset ( &start_undi, 0, sizeof ( start_undi ) );
start_undi.AX = undi->pci_busdevfn;
start_undi.BX = undi->isapnp_csn;
start_undi.DX = undi->isapnp_read_port;
start_undi.ES = BIOS_SEG;
start_undi.DI = find_pnp_bios();
if ( ( rc = undinet_call ( undinic, PXENV_START_UNDI,
&start_undi,
sizeof ( start_undi ) ) ) != 0 )
goto err_start_undi;
}
undi->flags |= UNDI_FL_STARTED;
/* Bring up UNDI stack */
memset ( &undi_startup, 0, sizeof ( undi_startup ) );
@@ -703,6 +707,7 @@ void undinet_remove ( struct undi_device *undi ) {
memset ( &stop_undi, 0, sizeof ( stop_undi ) );
undinet_call ( undinic, PXENV_STOP_UNDI, &stop_undi,
sizeof ( stop_undi ) );
undi->flags &= ~UNDI_FL_STARTED;
/* Free network device */
free_netdev ( netdev );