diff options
author | Michael Brown | 2007-01-29 16:21:10 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-29 16:21:10 +0100 |
commit | 7d9267561b6ece59624e7dc0d521535d56278646 (patch) | |
tree | 45751d67c36f6927331646f71dd5e20d6a82697c /src/arch/i386/drivers | |
parent | Split bootsector execution code out into bootsector.c. (diff) | |
download | ipxe-7d9267561b6ece59624e7dc0d521535d56278646.tar.gz ipxe-7d9267561b6ece59624e7dc0d521535d56278646.tar.xz ipxe-7d9267561b6ece59624e7dc0d521535d56278646.zip |
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.
Diffstat (limited to 'src/arch/i386/drivers')
-rw-r--r-- | src/arch/i386/drivers/net/undinet.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/arch/i386/drivers/net/undinet.c b/src/arch/i386/drivers/net/undinet.c index e479269a..835ec76d 100644 --- a/src/arch/i386/drivers/net/undinet.c +++ b/src/arch/i386/drivers/net/undinet.c @@ -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 ); |