summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/3c509.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-15 01:20:56 +0200
committerMichael Brown2005-04-15 01:20:56 +0200
commitc7694a5322e23763f9538025bdc56b2f603db1b0 (patch)
tree198340b231af1a37034e553862ba06eb34a7da92 /src/drivers/net/3c509.c
parentMoved core/isapnp.c to drivers/bus/isapnp.c (diff)
downloadipxe-c7694a5322e23763f9538025bdc56b2f603db1b0.tar.gz
ipxe-c7694a5322e23763f9538025bdc56b2f603db1b0.tar.xz
ipxe-c7694a5322e23763f9538025bdc56b2f603db1b0.zip
Cleaner separation of find_t509_device/fill_t509_device.
Diffstat (limited to 'src/drivers/net/3c509.c')
-rw-r--r--src/drivers/net/3c509.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/drivers/net/3c509.c b/src/drivers/net/3c509.c
index 0a85e469..e73bf84b 100644
--- a/src/drivers/net/3c509.c
+++ b/src/drivers/net/3c509.c
@@ -120,6 +120,17 @@ static inline int fill_t509_device ( struct t509_device *t509 ) {
int i;
uint16_t iobase;
+ /*
+ * We need an ID port, if we don't already have one.
+ *
+ */
+ if ( ! t509->id_port ) {
+ if ( ! find_id_port ( t509 ) ) {
+ DBG ( "No ID port available for contention select\n" );
+ return 0;
+ }
+ }
+
/*
* If this is the start of the scan, clear all tag registers.
* Otherwise, tell already-found NICs not to respond.
@@ -173,10 +184,6 @@ static inline int find_t509_device ( struct t509_device *t509,
if ( t509->magic != t509_magic ) {
memset ( t509, 0, sizeof ( *t509 ) );
t509->magic = t509_magic;
- if ( ! find_id_port ( t509 ) ) {
- DBG ( "No ID port available for contention select\n" );
- return 0;
- }
}
/* Find the next t509 device */