aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavem <davem>2002-01-15 06:26:37 +0000
committerdavem <davem>2002-01-15 06:26:37 +0000
commit536642ea6ebaa986e5c99320506a70c46ea6b342 (patch)
tree065d294c196abd4348c298a60745e38c128bc1f9
parent4d96e9d5b224da0d7fc611c0c8864799d23433b0 (diff)
downloadnetdev-vger-cvs-536642ea6ebaa986e5c99320506a70c46ea6b342.tar.gz
Fixes from Benjamin. Make sure we stop the
chip and (re-)init the PHY equally on all variants.
-rw-r--r--drivers/net/sungem.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 6563a1ea9..d9f5edf35 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -1,4 +1,4 @@
-/* $Id: sungem.c,v 1.47 2002-01-15 06:25:51 davem Exp $
+/* $Id: sungem.c,v 1.48 2002-01-15 06:26:37 davem Exp $
* sungem.c: Sun GEM ethernet driver.
*
* Copyright (C) 2000, 2001 David S. Miller (davem@redhat.com)
@@ -2076,16 +2076,14 @@ static void gem_shutdown(struct gem *gp)
schedule();
/* Actually stop the chip */
- if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE)
+ if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE) {
gem_stop_phy(gp);
- else
- gem_stop(gp);
-
#ifdef CONFIG_ALL_PPC
- /* Power down the chip */
- if (gp->pdev->vendor == PCI_VENDOR_ID_APPLE)
+ /* Power down the chip */
gem_apple_powerdown(gp);
#endif /* CONFIG_ALL_PPC */
+ } else
+ gem_stop(gp);
}
static void gem_pm_task(void *data)
@@ -2697,25 +2695,15 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
* not have properly shut down the PHY.
*/
#ifdef CONFIG_ALL_PPC
- if (pdev->vendor == PCI_VENDOR_ID_APPLE) {
+ if (pdev->vendor == PCI_VENDOR_ID_APPLE)
gem_apple_powerup(gp);
- if (gem_check_invariants(gp))
- goto err_out_iounmap;
- gem_stop(gp);
- gp->hw_running = 1;
- gem_init_phy(gp);
- gem_begin_auto_negotiation(gp, NULL);
- }
#endif
- /* Non Apple hardware, we just reset the chip and check
- * for invariants
- */
- if (pdev->vendor != PCI_VENDOR_ID_APPLE) {
- gem_stop(gp);
- if (gem_check_invariants(gp))
- goto err_out_iounmap;
- gp->hw_running = 1;
- }
+ gem_stop(gp);
+ if (gem_check_invariants(gp))
+ goto err_out_iounmap;
+ gp->hw_running = 1;
+ gem_init_phy(gp);
+ gem_begin_auto_negotiation(gp, NULL);
/* It is guarenteed that the returned buffer will be at least
* PAGE_SIZE aligned.