Module Name: src Committed By: msaitoh Date: Thu Jan 7 17:34:38 UTC 2010
Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: bugfixes: - add missing break in wm_reset()... - fix the offset of WMREG_PBS... - fix length of some delay()s in wm_gmii_reset() To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.187 src/sys/dev/pci/if_wm.c:1.188 --- src/sys/dev/pci/if_wm.c:1.187 Tue Jan 5 10:02:01 2010 +++ src/sys/dev/pci/if_wm.c Thu Jan 7 17:34:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.187 2010/01/05 10:02:01 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.188 2010/01/07 17:34:38 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.187 2010/01/05 10:02:01 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.188 2010/01/07 17:34:38 msaitoh Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -3121,7 +3121,7 @@ wm_get_swfwhw_semaphore(sc); CSR_WRITE(sc, WMREG_CTRL, CTRL_RST | CTRL_PHY_RESET); delay(10000); - + break; default: /* Everything else can safely use the documented method. */ CSR_WRITE(sc, WMREG_CTRL, CTRL_RST); @@ -4596,7 +4596,7 @@ CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl | CTRL_PHY_RESET); delay((sc->sc_type >= WM_T_82571) ? 100 : 10*1000); CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); - delay(150*1000); + delay(150); if ((sc->sc_type == WM_T_82541) || (sc->sc_type == WM_T_82541_2) @@ -4613,7 +4613,7 @@ CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl | CTRL_PHY_RESET); delay(100); CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); - delay(150*1000); + delay(150); /* Allow time for h/w to get to a quiescent state afer reset */ delay(10*1000); Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.30 src/sys/dev/pci/if_wmreg.h:1.31 --- src/sys/dev/pci/if_wmreg.h:1.30 Tue Jan 5 10:02:01 2010 +++ src/sys/dev/pci/if_wmreg.h Thu Jan 7 17:34:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmreg.h,v 1.30 2010/01/05 10:02:01 msaitoh Exp $ */ +/* $NetBSD: if_wmreg.h,v 1.31 2010/01/07 17:34:38 msaitoh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -610,7 +610,7 @@ #define PBA_40K 0x0028 #define PBA_48K 0x0030 /* 48K, default Rx allocation */ -#define WMREG_PBS 0x1000 /* Packet Buffer Size (ICH8 only ?) */ +#define WMREG_PBS 0x1008 /* Packet Buffer Size (ICH) */ #define WMREG_TXDMAC 0x3000 /* Transfer DMA Control */ #define TXDMAC_DPP (1U << 0) /* disable packet prefetch */