Parcourir la source

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.
tags/v0.9.3
Michael Brown il y a 19 ans
Parent
révision
8aa3b9d972
1 fichiers modifiés avec 9 ajouts et 8 suppressions
  1. 9
    8
      src/drivers/bus/isapnp.c

+ 9
- 8
src/drivers/bus/isapnp.c Voir le fichier

@@ -372,7 +372,8 @@ static int isapnp_try_isolate ( void ) {
372 372
 	isapnp_wait_for_key ();
373 373
 
374 374
 	/* Return number of cards found */
375
-	DBG ( "ISAPnP found %d cards at read port %hx\n", isapnp_read_port );
375
+	DBG ( "ISAPnP found %d cards at read port %hx\n",
376
+	      isapnp_max_csn, isapnp_read_port );
376 377
 	return isapnp_max_csn;
377 378
 }
378 379
 
@@ -407,13 +408,6 @@ static int fill_isapnp_device ( struct isapnp_device *isapnp ) {
407 408
 	unsigned int i;
408 409
 	struct isapnp_logdevid logdevid;
409 410
 	
410
-	/* Ensure that all ISAPnP cards have CSNs allocated to them,
411
-	 * if we haven't already done so.
412
-	 */
413
-	if ( ! isapnp_read_port ) {
414
-		isapnp_isolate();
415
-	}
416
-
417 411
 	/* Wake the card */
418 412
 	isapnp_wait_for_key ();
419 413
 	isapnp_send_key ();
@@ -469,6 +463,13 @@ int find_isapnp_device ( struct isapnp_device *isapnp,
469 463
 		isapnp->csn = 1;
470 464
 	}
471 465
 
466
+	/* Ensure that all ISAPnP cards have CSNs allocated to them,
467
+	 * if we haven't already done so.
468
+	 */
469
+	if ( ! isapnp_read_port ) {
470
+		isapnp_isolate();
471
+	}
472
+
472 473
 	/* Iterate through all possible ISAPNP CSNs, starting where we
473 474
 	 * left off.
474 475
 	 */

Chargement…
Annuler
Enregistrer