Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix brain'o in PCIX speed detection. kern/23375...
details: https://anonhg.NetBSD.org/src/rev/bfa92f55715f
branches: trunk
changeset: 555010:bfa92f55715f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Nov 07 06:03:52 2003 +0000
description:
Fix brain'o in PCIX speed detection. kern/23375 (John R. Shannon).
diffstat:
sys/dev/pci/if_wm.c | 9 +++++----
sys/dev/pci/if_wmreg.h | 3 ++-
2 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r d78466ee64a1 -r bfa92f55715f sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Fri Nov 07 04:44:57 2003 +0000
+++ b/sys/dev/pci/if_wm.c Fri Nov 07 06:03:52 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.61 2003/11/04 19:09:39 thorpej Exp $ */
+/* $NetBSD: if_wm.c,v 1.62 2003/11/07 06:03:52 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.61 2003/11/04 19:09:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.62 2003/11/07 06:03:52 thorpej Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -857,7 +857,7 @@
sc->sc_bus_speed = (sc->sc_flags & WM_F_PCIX) ? 120
: 66;
} else if (sc->sc_flags & WM_F_PCIX) {
- switch (STATUS_PCIXSPD(reg)) {
+ switch (reg & STATUS_PCIXSPD_MASK) {
case STATUS_PCIXSPD_50_66:
sc->sc_bus_speed = 66;
break;
@@ -870,7 +870,8 @@
default:
aprint_error(
"%s: unknown PCIXSPD %d; assuming 66MHz\n",
- sc->sc_dev.dv_xname, STATUS_PCIXSPD(reg));
+ sc->sc_dev.dv_xname,
+ reg & STATUS_PCIXSPD_MASK);
sc->sc_bus_speed = 66;
}
} else
diff -r d78466ee64a1 -r bfa92f55715f sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h Fri Nov 07 04:44:57 2003 +0000
+++ b/sys/dev/pci/if_wmreg.h Fri Nov 07 06:03:52 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wmreg.h,v 1.7 2003/10/21 05:07:10 thorpej Exp $ */
+/* $NetBSD: if_wmreg.h,v 1.8 2003/11/07 06:03:52 thorpej Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -220,6 +220,7 @@
#define STATUS_PCIXSPD_50_66 STATUS_PCIXSPD(0)
#define STATUS_PCIXSPD_66_100 STATUS_PCIXSPD(1)
#define STATUS_PCIXSPD_100_133 STATUS_PCIXSPD(2)
+#define STATUS_PCIXSPD_MASK STATUS_PCIXSPD(3)
#define WMREG_EECD 0x0010 /* EEPROM Control Register */
#define EECD_SK (1U << 0) /* clock */
Home |
Main Index |
Thread Index |
Old Index