summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2013-03-17 10:56:23 +0000
committerbrad <brad@openbsd.org>2013-03-17 10:56:23 +0000
commitaa1dd77fd69f5cd51b4179763a1158fc1a19fd68 (patch)
tree9f2c993ba957350cc122abce7dfb4802e8429604
parent- Sync some of the stats counter code to be closer to the FreeBSD code, (diff)
downloadwireguard-openbsd-aa1dd77fd69f5cd51b4179763a1158fc1a19fd68.tar.xz
wireguard-openbsd-aa1dd77fd69f5cd51b4179763a1158fc1a19fd68.zip
Correct the clock speeds used to calculate int moderation values provided
by the SK_IM_USECS() macro. From FreeBSD ok sthen@
-rw-r--r--sys/dev/pci/if_msk.c17
-rw-r--r--sys/dev/pci/if_skreg.h5
2 files changed, 18 insertions, 4 deletions
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index bf67e0a9929..54c61b556b1 100644
--- a/sys/dev/pci/if_msk.c
+++ b/sys/dev/pci/if_msk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_msk.c,v 1.97 2013/02/01 06:51:32 brad Exp $ */
+/* $OpenBSD: if_msk.c,v 1.98 2013/03/17 10:56:23 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -771,11 +771,22 @@ mskc_reset(struct sk_softc *sc)
*/
switch (sc->sk_type) {
case SK_YUKON_EC:
- case SK_YUKON_XL:
- case SK_YUKON_FE:
+ case SK_YUKON_EC_U:
+ case SK_YUKON_EX:
+ case SK_YUKON_SUPR:
+ case SK_YUKON_ULTRA2:
case SK_YUKON_OPTIMA:
imtimer_ticks = SK_IMTIMER_TICKS_YUKON_EC;
break;
+ case SK_YUKON_FE:
+ imtimer_ticks = SK_IMTIMER_TICKS_YUKON_FE;
+ break;
+ case SK_YUKON_FE_P:
+ imtimer_ticks = SK_IMTIMER_TICKS_YUKON_FE_P;
+ break;
+ case SK_YUKON_XL:
+ imtimer_ticks = SK_IMTIMER_TICKS_YUKON_XL;
+ break;
default:
imtimer_ticks = SK_IMTIMER_TICKS_YUKON;
}
diff --git a/sys/dev/pci/if_skreg.h b/sys/dev/pci/if_skreg.h
index 321d4ab20e5..f3f0aa53a86 100644
--- a/sys/dev/pci/if_skreg.h
+++ b/sys/dev/pci/if_skreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_skreg.h,v 1.57 2012/10/18 21:44:21 deraadt Exp $ */
+/* $OpenBSD: if_skreg.h,v 1.58 2013/03/17 10:56:23 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -395,9 +395,12 @@
#define SK_IMCTL_START 0x04
/* Number of ticks per usec for interrupt moderation */
+#define SK_IMTIMER_TICKS_YUKON_FE_P 50
#define SK_IMTIMER_TICKS_GENESIS 53
#define SK_IMTIMER_TICKS_YUKON 78
+#define SK_IMTIMER_TICKS_YUKON_FE 100
#define SK_IMTIMER_TICKS_YUKON_EC 125
+#define SK_IMTIMER_TICKS_YUKON_XL 156
#define SK_IM_USECS(x) ((x) * imtimer_ticks)
/*