Parcourir la source

[3c90x] Fix a3c90x_close() and a3c90x_remove() methods.

Both methods disabled packet tx and rx just to have it enabled again
by calling a3c90x_reset().
Fixed by disabling tx and rx after the call to a3c90x_reset().

Tested by booting Ubuntu intrepid(8.10) directly from gPXE and pxelinux.
Tested on 3c905, 3c905B, 3c905C.

Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v0.9.9
Thomas Miletich il y a 14 ans
Parent
révision
584e378241
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3
    3
      src/drivers/net/3c90x.c

+ 3
- 3
src/drivers/net/3c90x.c Voir le fichier

619
 
619
 
620
 	DBGP("a3c90x_remove\n");
620
 	DBGP("a3c90x_remove\n");
621
 
621
 
622
-	unregister_netdev(netdev);
622
+	a3c90x_reset(inf_3c90x);
623
 
623
 
624
 	/* Disable the receiver and transmitter. */
624
 	/* Disable the receiver and transmitter. */
625
 	outw(cmdRxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
625
 	outw(cmdRxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
626
 	outw(cmdTxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
626
 	outw(cmdTxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
627
 
627
 
628
-	a3c90x_reset(inf_3c90x);
628
+	unregister_netdev(netdev);
629
 	netdev_nullify(netdev);
629
 	netdev_nullify(netdev);
630
 	netdev_put(netdev);
630
 	netdev_put(netdev);
631
 }
631
 }
845
 
845
 
846
 	DBGP("a3c90x_close\n");
846
 	DBGP("a3c90x_close\n");
847
 
847
 
848
+	a3c90x_reset(inf_3c90x);
848
 	outw(cmdRxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
849
 	outw(cmdRxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
849
 	outw(cmdTxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
850
 	outw(cmdTxDisable, inf_3c90x->IOAddr + regCommandIntStatus_w);
850
-	a3c90x_reset(inf_3c90x);
851
 	a3c90x_free_resources(inf_3c90x);
851
 	a3c90x_free_resources(inf_3c90x);
852
 }
852
 }
853
 
853
 

Chargement…
Annuler
Enregistrer