Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci wm_gmii_reset(): restore generic reset delays to...



details:   https://anonhg.NetBSD.org/src/rev/d20933f240e8
branches:  trunk
changeset: 761734:d20933f240e8
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Feb 06 16:23:00 2011 +0000

description:
wm_gmii_reset(): restore generic reset delays to what they were before
rev 1.186. This makes the following hardware find its PHY again, and I can't
see how these larger delays could be a problem for other hardware:

wm0 at pci6 dev 7 function 0: Intel i82541GI 1000BASE-T Ethernet, rev. 5
wm0: interrupting at ioapic2 pin 0, event channel 5
wm0: 32-bit 66MHz PCI bus
wm0: 65536 word (16 address bits) SPI EEPROM
wm0: Ethernet address 00:13:72:54:ee:13
igphy0 at wm0 phy 1: Intel IGP01E1000 Gigabit PHY, rev. 0
igphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

diffstat:

 sys/dev/pci/if_wm.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 43ee571f2dd8 -r d20933f240e8 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Sun Feb 06 15:48:20 2011 +0000
+++ b/sys/dev/pci/if_wm.c       Sun Feb 06 16:23:00 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.218 2011/01/26 00:25:34 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $       */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.218 2011/01/26 00:25:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $");
 
 #include "rnd.h"
 
@@ -5442,9 +5442,9 @@
        case WM_T_80003:
                /* generic reset */
                CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl | CTRL_PHY_RESET);
-               delay((sc->sc_type >= WM_T_82571) ? 100 : 10*1000);
+               delay(20000);
                CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl);
-               delay(150);
+               delay(20000);
 
                if ((sc->sc_type == WM_T_82541)
                    || (sc->sc_type == WM_T_82541_2)



Home | Main Index | Thread Index | Old Index