summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2014-04-23 02:58:06 +0000
committerjsg <jsg@openbsd.org>2014-04-23 02:58:06 +0000
commitf0a2d0bc6d0bff785a1cd67f1fe370c2d1ca068f (patch)
treeda521906211b4c4f34e6c1f47b8f90e77f56b60d
parentAdd support for RTL8168GU (diff)
downloadwireguard-openbsd-f0a2d0bc6d0bff785a1cd67f1fe370c2d1ca068f.tar.xz
wireguard-openbsd-f0a2d0bc6d0bff785a1cd67f1fe370c2d1ca068f.zip
While we always mask the revision with 0x7c800000 linux uses a table
that masks with either 0x7c800000 or 0x7cf00000 depending on the chip. Some of the hardware revisions I previously added can't be matched with the current mask, these are already handled by other revision defines so remove them. When masking the revision defines with 0x7c800000: RL_HWREV_8106E_SPIN1 is the same as RL_HWREV_8106E RL_HWREV_8168G_SPIN1 is the same as RL_HWREV_8168G RL_HWREV_8168G_SPIN2 is the same as RL_HWREV_8168GU
-rw-r--r--sys/dev/ic/re.c13
-rw-r--r--sys/dev/ic/rtl81x9reg.h5
2 files changed, 2 insertions, 16 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index deba05b3af7..384cf6485be 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.150 2014/04/23 02:39:28 jsg Exp $ */
+/* $OpenBSD: re.c,v 1.151 2014/04/23 02:58:06 jsg Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -220,7 +220,6 @@ static const struct re_revision {
{ RL_HWREV_8101E, "RTL8101E" },
{ RL_HWREV_8102E, "RTL8102E" },
{ RL_HWREV_8106E, "RTL8106E" },
- { RL_HWREV_8106E_SPIN1, "RTL8106E" },
{ RL_HWREV_8401E, "RTL8401E" },
{ RL_HWREV_8402, "RTL8402" },
{ RL_HWREV_8411, "RTL8411" },
@@ -237,8 +236,6 @@ static const struct re_revision {
{ RL_HWREV_8168CP, "RTL8168CP/8111CP" },
{ RL_HWREV_8168F, "RTL8168F/8111F" },
{ RL_HWREV_8168G, "RTL8168G/8111G" },
- { RL_HWREV_8168G_SPIN1, "RTL8168G/8111G" },
- { RL_HWREV_8168G_SPIN2, "RTL8168G/8111G" },
{ RL_HWREV_8168G_SPIN4, "RTL8168G/8111G" },
{ RL_HWREV_8168GU, "RTL8168GU/8111GU" },
{ RL_HWREV_8105E, "RTL8105E" },
@@ -666,7 +663,6 @@ re_attach(struct rl_softc *sc, const char *intrstr)
case RL_HWREV_8105E:
case RL_HWREV_8105E_SPIN1:
case RL_HWREV_8106E:
- case RL_HWREV_8106E_SPIN1:
sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE |
RL_FLAG_PHYWAKE_PM | RL_FLAG_PAR | RL_FLAG_DESCV2 |
RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD |
@@ -716,7 +712,6 @@ re_attach(struct rl_softc *sc, const char *intrstr)
RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO;
break;
case RL_HWREV_8168G:
- case RL_HWREV_8168G_SPIN1:
case RL_HWREV_8168G_SPIN4:
case RL_HWREV_8168GU:
sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE |
@@ -724,12 +719,6 @@ re_attach(struct rl_softc *sc, const char *intrstr)
RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO |
RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED;
break;
- case RL_HWREV_8168G_SPIN2:
- sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE |
- RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
- RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO |
- RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED;
- break;
case RL_HWREV_8169_8110SB:
case RL_HWREV_8169_8110SBL:
case RL_HWREV_8169_8110SCd:
diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h
index ef74244d427..1449aff4681 100644
--- a/sys/dev/ic/rtl81x9reg.h
+++ b/sys/dev/ic/rtl81x9reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9reg.h,v 1.81 2014/04/23 02:39:28 jsg Exp $ */
+/* $OpenBSD: rtl81x9reg.h,v 1.82 2014/04/23 02:58:06 jsg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -188,13 +188,10 @@
#define RL_HWREV_8105E_SPIN1 0x40C00000
#define RL_HWREV_8402 0x44000000
#define RL_HWREV_8106E 0x44800000
-#define RL_HWREV_8106E_SPIN1 0x44900000
#define RL_HWREV_8168F 0x48000000
#define RL_HWREV_8411 0x48800000
#define RL_HWREV_8168G 0x4c000000
-#define RL_HWREV_8168G_SPIN1 0x4c100000
#define RL_HWREV_8168GU 0x50800000
-#define RL_HWREV_8168G_SPIN2 0x50900000
#define RL_HWREV_8168G_SPIN4 0x5c800000
#define RL_HWREV_8139 0x60000000
#define RL_HWREV_8139A 0x70000000