diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-07-11 16:51:59 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-07-11 16:51:59 +0000 |
commit | 024bf07870b67ce7a72e80266d2b22528fa224e2 (patch) | |
tree | e14232ced9bbca07ec54e28bf895e1342e2db06c /sys | |
parent | fabac6b601c673862359aeafd17a7c1506682703 (diff) |
- Add some new feature flags
- Add defines for newer chipsets
From FreeBSD via Brad. No functional change, needed for future work.
ok naddy@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/re.c | 12 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9reg.h | 8 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index a258e64a66b..b5c095ee2f2 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.109 2009/07/10 21:29:57 sthen Exp $ */ +/* $OpenBSD: re.c,v 1.110 2009/07/11 16:51:58 sthen Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -811,7 +811,7 @@ re_attach(struct rl_softc *sc, const char *intrstr) switch (sc->sc_hwrev) { case RL_HWREV_8139CPLUS: - sc->rl_flags |= RL_FLAG_NOJUMBO; + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_AUTOPAD; break; case RL_HWREV_8100E_SPIN1: case RL_HWREV_8100E_SPIN2: @@ -824,7 +824,7 @@ re_attach(struct rl_softc *sc, const char *intrstr) case RL_HWREV_8103E: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | - RL_FLAG_MACSTAT; + RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -832,14 +832,16 @@ re_attach(struct rl_softc *sc, const char *intrstr) sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_MACSTAT | RL_FLAG_HWIM; break; - case RL_HWREV_8168C: case RL_HWREV_8168C_SPIN2: + sc->rl_flags |= RL_FLAG_MACSLEEP; + /* FALLTHROUGH */ + case RL_HWREV_8168C: case RL_HWREV_8168CP: case RL_HWREV_8168D: case RL_HWREV_8168DP: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | - RL_FLAG_HWIM; + RL_FLAG_HWIM | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; /* * These controllers support jumbo frame but it seems * that enabling it requires touching additional magic diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h index 2018b970db1..84b17e32580 100644 --- a/sys/dev/ic/rtl81x9reg.h +++ b/sys/dev/ic/rtl81x9reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9reg.h,v 1.64 2009/07/10 21:27:49 sthen Exp $ */ +/* $OpenBSD: rtl81x9reg.h,v 1.65 2009/07/11 16:51:58 sthen Exp $ */ /* * Copyright (c) 1997, 1998 @@ -136,6 +136,8 @@ #define RL_TBI_ANAR 0x0068 #define RL_TBI_LPAR 0x006A #define RL_GMEDIASTAT 0x006C /* 8 bits */ +#define RL_MACDBG 0x006D /* 8 bits */ +#define RL_GPIO 0x006E /* 8 bits */ #define RL_LDPS 0x0082 /* Link Down Power Saving */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_IM 0x00E2 @@ -316,6 +318,7 @@ #define RL_CMD_TX_ENB 0x0004 #define RL_CMD_RX_ENB 0x0008 #define RL_CMD_RESET 0x0010 +#define RL_CMD_STOPREQ 0x0080 /* * EEPROM control register @@ -829,6 +832,9 @@ struct rl_softc { #define RL_FLAG_HWIM 0x0200 #define RL_FLAG_TIMERINTR 0x0400 #define RL_FLAG_MACLDPS 0x0800 +#define RL_FLAG_CMDSTOP 0x1000 +#define RL_FLAG_MACSLEEP 0x2000 +#define RL_FLAG_AUTOPAD 0x4000 #define RL_FLAG_LINK 0x8000 u_int16_t rl_intrs; |