diff options
| author | Michael Brown | 2007-01-09 03:58:07 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-09 03:58:07 +0100 |
| commit | 6b09dd824420f4507efe4ddf956f63825a1b4f35 (patch) | |
| tree | 7a170a71cea0032be4af6f00b6e9b8deecba7832 /src/arch/i386/drivers/net/undiload.c | |
| parent | Avoid erasing non-existent signatures in undi_unload() (diff) | |
| download | ipxe-6b09dd824420f4507efe4ddf956f63825a1b4f35.tar.gz ipxe-6b09dd824420f4507efe4ddf956f63825a1b4f35.tar.xz ipxe-6b09dd824420f4507efe4ddf956f63825a1b4f35.zip | |
undipci_probe() has to calculate busdevfn anyway, so we may as well pass
it directly to undi_load_pci().
Diffstat (limited to 'src/arch/i386/drivers/net/undiload.c')
| -rw-r--r-- | src/arch/i386/drivers/net/undiload.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/arch/i386/drivers/net/undiload.c b/src/arch/i386/drivers/net/undiload.c index a0669d959..27f265268 100644 --- a/src/arch/i386/drivers/net/undiload.c +++ b/src/arch/i386/drivers/net/undiload.c @@ -49,7 +49,7 @@ static SEGOFF16_t __data16 ( undi_loader_entry ); * @v undirom UNDI ROM * @ret rc Return status code */ -static int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) { +int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) { struct s_PXE ppxe; uint16_t fbms; unsigned int fbms_seg; @@ -139,22 +139,6 @@ static int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) { } /** - * Call UNDI loader to create a pixie - * - * @v undi UNDI device - * @v undirom UNDI ROM - * @v pci_busdevfn PCI bus:dev.fn - * @ret rc Return status code - */ -int undi_load_pci ( struct undi_device *undi, struct undi_rom *undirom, - unsigned int bus, unsigned int devfn ) { - undi->pci_busdevfn = ( ( bus << 8 ) | devfn ); - undi->isapnp_csn = 0xffff; - undi->isapnp_read_port = 0xffff; - return undi_load ( undi, undirom ); -} - -/** * Unload a pixie * * @v undi UNDI device @@ -172,7 +156,7 @@ int undi_unload ( struct undi_device *undi ) { /* Erase signatures */ if ( undi->pxenv.segment ) put_real ( dead, undi->pxenv.segment, undi->pxenv.offset ); - if ( undi->ppxe_segment ) + if ( undi->ppxe.segment ) put_real ( dead, undi->ppxe.segment, undi->ppxe.offset ); /* Free base memory, if possible */ |
