summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/drivers
diff options
context:
space:
mode:
authorMichael Brown2007-01-09 03:58:07 +0100
committerMichael Brown2007-01-09 03:58:07 +0100
commit6b09dd824420f4507efe4ddf956f63825a1b4f35 (patch)
tree7a170a71cea0032be4af6f00b6e9b8deecba7832 /src/arch/i386/drivers
parentAvoid erasing non-existent signatures in undi_unload() (diff)
downloadipxe-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')
-rw-r--r--src/arch/i386/drivers/net/undi.c3
-rw-r--r--src/arch/i386/drivers/net/undiload.c20
2 files changed, 3 insertions, 20 deletions
diff --git a/src/arch/i386/drivers/net/undi.c b/src/arch/i386/drivers/net/undi.c
index a6f1267b..4508253d 100644
--- a/src/arch/i386/drivers/net/undi.c
+++ b/src/arch/i386/drivers/net/undi.c
@@ -91,8 +91,7 @@ static int undipci_probe ( struct pci_device *pci,
}
/* Call UNDI ROM loader to create pixie */
- if ( ( rc = undi_load_pci ( undi, undirom, pci->bus,
- pci->devfn ) ) != 0 )
+ if ( ( rc = undi_load_pci ( undi, undirom, busdevfn ) ) != 0 )
goto err_load_pci;
}
diff --git a/src/arch/i386/drivers/net/undiload.c b/src/arch/i386/drivers/net/undiload.c
index a0669d95..27f26526 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 */