From 8aa3b9d9721fef599988aa0343af9917a3db509d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 15 Apr 2005 17:03:39 +0000 Subject: [PATCH] Need to do isolation when find_isapnp_device is first called, otherwise isapnp_max_csn is zero and we never call fill_isapnp_device. Fix debug message. --- src/drivers/bus/isapnp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c index acd3b54f..eea88ee8 100644 --- a/src/drivers/bus/isapnp.c +++ b/src/drivers/bus/isapnp.c @@ -372,7 +372,8 @@ static int isapnp_try_isolate ( void ) { isapnp_wait_for_key (); /* Return number of cards found */ - DBG ( "ISAPnP found %d cards at read port %hx\n", isapnp_read_port ); + DBG ( "ISAPnP found %d cards at read port %hx\n", + isapnp_max_csn, isapnp_read_port ); return isapnp_max_csn; } @@ -407,13 +408,6 @@ static int fill_isapnp_device ( struct isapnp_device *isapnp ) { unsigned int i; struct isapnp_logdevid logdevid; - /* Ensure that all ISAPnP cards have CSNs allocated to them, - * if we haven't already done so. - */ - if ( ! isapnp_read_port ) { - isapnp_isolate(); - } - /* Wake the card */ isapnp_wait_for_key (); isapnp_send_key (); @@ -469,6 +463,13 @@ int find_isapnp_device ( struct isapnp_device *isapnp, isapnp->csn = 1; } + /* Ensure that all ISAPnP cards have CSNs allocated to them, + * if we haven't already done so. + */ + if ( ! isapnp_read_port ) { + isapnp_isolate(); + } + /* Iterate through all possible ISAPNP CSNs, starting where we * left off. */