Browse 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 15 years ago
parent
commit
584e378241
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/drivers/net/3c90x.c

+ 3
- 3
src/drivers/net/3c90x.c View File

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

Loading…
Cancel
Save