A diff to mainly add some bits for supporting newer chipsets.
The RTL8103E is a new FastE chipset and RTL8168DP is a new
GigE chipset. The swapping of the device id's for the RTL8169S
chipset and the RTL8110S chipset results in no functional change
for the chipsets as they have the same set of feature flags.
- Recognize the RTL8103E and RTL8168DP chipsets.
>From NetBSD
- Swap the device id's for the RTL8169S and RTL8110S chipsets.
(from the Linux driver).
- Add some new feature flags.
- Add some defines for newer chipsets.
>From FreeBSD
Index: re.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.107
diff -u -p -r1.107 re.c
--- re.c 4 Jun 2009 04:48:24 -0000 1.107
+++ re.c 24 Jun 2009 06:21:15 -0000
@@ -222,6 +222,7 @@ static const struct re_revision {
{ RL_HWREV_8101E, "RTL8101E" },
{ RL_HWREV_8102E, "RTL8102E" },
{ RL_HWREV_8102EL, "RTL8102EL" },
+ { RL_HWREV_8103E, "RTL8103E" },
{ RL_HWREV_8110S, "RTL8110S" },
{ RL_HWREV_8139CPLUS, "RTL8139C+" },
{ RL_HWREV_8168_SPIN1, "RTL8168 1" },
@@ -231,6 +232,7 @@ static const struct re_revision {
{ RL_HWREV_8168C_SPIN2, "RTL8168C/8111C" },
{ RL_HWREV_8168CP, "RTL8168CP/8111CP" },
{ RL_HWREV_8168D, "RTL8168D/8111D" },
+ { RL_HWREV_8168DP, "RTL8168DP" },
{ RL_HWREV_8169, "RTL8169" },
{ RL_HWREV_8169_8110SB, "RTL8169/8110SB" },
{ RL_HWREV_8169_8110SBL, "RTL8169SBL" },
@@ -809,7 +811,7 @@ re_attach(struct rl_softc *sc, const cha
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:
@@ -819,9 +821,10 @@ re_attach(struct rl_softc *sc, const cha
break;
case RL_HWREV_8102E:
case RL_HWREV_8102EL:
+ 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:
@@ -829,13 +832,16 @@ re_attach(struct rl_softc *sc, const cha
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
Index: rtl81x9reg.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.62
diff -u -p -r1.62 rtl81x9reg.h
--- rtl81x9reg.h 3 Jun 2009 00:11:19 -0000 1.62
+++ rtl81x9reg.h 24 Jun 2009 06:12:39 -0000
@@ -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
@@ -158,12 +160,14 @@
/* Known revision codes. */
#define RL_HWREV_8169 0x00000000
-#define RL_HWREV_8110S 0x00800000
-#define RL_HWREV_8169S 0x04000000
+#define RL_HWREV_8169S 0x00800000
+#define RL_HWREV_8110S 0x04000000
#define RL_HWREV_8169_8110SB 0x10000000
#define RL_HWREV_8169_8110SCd 0x18000000
#define RL_HWREV_8102EL 0x24800000
+#define RL_HWREV_8103E 0x24C00000
#define RL_HWREV_8168D 0x28000000
+#define RL_HWREV_8168DP 0x28800000
#define RL_HWREV_8168_SPIN1 0x30000000
#define RL_HWREV_8100E_SPIN1 0x30800000
#define RL_HWREV_8101E 0x34000000
@@ -314,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
@@ -827,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;
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.