diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2013-03-17 10:56:24 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2013-03-17 10:56:24 +0000 |
commit | 341f820123602e25d9b3f60bfce2e6373b88e21e (patch) | |
tree | 26183a8ef7e61fe512ff67bc61c66bc8d3d2c041 | |
parent | ea6c118a931140b92dd43f64f1ab8816c69307de (diff) |
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.c | 17 | ||||
-rw-r--r-- | sys/dev/pci/if_skreg.h | 5 |
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) /* |