Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Merge if_wm.c rev. 1.162.4.13 and if_wmvar.h rev...



details:   https://anonhg.NetBSD.org/src/rev/ea01fae0de9b
branches:  trunk
changeset: 752415:ea01fae0de9b
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Feb 25 15:07:06 2010 +0000

description:
Merge if_wm.c rev. 1.162.4.13 and if_wmvar.h rev. 1.2.46.3 into maintrunk.
Increase the timeout value to prevent timeout on 80003. The values are taken
from Intel's e1000 driver. Tested by spz and me.

diffstat:

 sys/dev/pci/if_wm.c    |  12 ++++++------
 sys/dev/pci/if_wmvar.h |   3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 757f5dae2dae -r ea01fae0de9b sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Feb 25 13:51:44 2010 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Feb 25 15:07:06 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.199 2010/02/16 15:17:17 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.200 2010/02/25 15:07:06 msaitoh 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.199 2010/02/16 15:17:17 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.200 2010/02/25 15:07:06 msaitoh Exp $");
 
 #include "rnd.h"
 
@@ -5546,11 +5546,11 @@
        CSR_WRITE(sc, WMREG_MDIC, MDIC_OP_READ | MDIC_PHYADD(phy) |
            MDIC_REGADD(reg));
 
-       for (i = 0; i < 320; i++) {
+       for (i = 0; i < WM_GEN_POLL_TIMEOUT * 3; i++) {
                mdic = CSR_READ(sc, WMREG_MDIC);
                if (mdic & MDIC_READY)
                        break;
-               delay(10);
+               delay(50);
        }
 
        if ((mdic & MDIC_READY) == 0) {
@@ -5587,11 +5587,11 @@
        CSR_WRITE(sc, WMREG_MDIC, MDIC_OP_WRITE | MDIC_PHYADD(phy) |
            MDIC_REGADD(reg) | MDIC_DATA(val));
 
-       for (i = 0; i < 320; i++) {
+       for (i = 0; i < WM_GEN_POLL_TIMEOUT * 3; i++) {
                mdic = CSR_READ(sc, WMREG_MDIC);
                if (mdic & MDIC_READY)
                        break;
-               delay(10);
+               delay(50);
        }
 
        if ((mdic & MDIC_READY) == 0)
diff -r 757f5dae2dae -r ea01fae0de9b sys/dev/pci/if_wmvar.h
--- a/sys/dev/pci/if_wmvar.h    Thu Feb 25 13:51:44 2010 +0000
+++ b/sys/dev/pci/if_wmvar.h    Thu Feb 25 15:07:06 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wmvar.h,v 1.9 2010/02/16 15:17:17 msaitoh Exp $     */
+/*     $NetBSD: if_wmvar.h,v 1.10 2010/02/25 15:07:06 msaitoh Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -135,6 +135,7 @@
 } wm_phy_type;
 
 
+#define WM_GEN_POLL_TIMEOUT    640
 #define WM_PHY_CFG_TIMEOUT     100
 #define        WM_ICH8_LAN_INIT_TIMEOUT 1500
 #define        WM_MDIO_OWNERSHIP_TIMEOUT 10



Home | Main Index | Thread Index | Old Index