svn commit: r219116 - in stable/8/sys: dev/re pci

Pyun YongHyeon yongari at FreeBSD.org
Tue Mar 1 00:07:38 UTC 2011


Author: yongari
Date: Tue Mar  1 00:07:38 2011
New Revision: 219116
URL: http://svn.freebsd.org/changeset/base/219116

Log:
  MFC r218760:
    Add initial support for RTL8401E PCIe Fast Ethernet.
  
    PR:	154789

Modified:
  stable/8/sys/dev/re/if_re.c
  stable/8/sys/pci/if_rlreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/re/if_re.c
==============================================================================
--- stable/8/sys/dev/re/if_re.c	Tue Mar  1 00:05:46 2011	(r219115)
+++ stable/8/sys/dev/re/if_re.c	Tue Mar  1 00:07:38 2011	(r219116)
@@ -217,6 +217,7 @@ static struct rl_hwrev re_hwrevs[] = {
 	{ RL_HWREV_8102EL, RL_8169, "8102EL", RL_MTU },
 	{ RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL", RL_MTU },
 	{ RL_HWREV_8103E, RL_8169, "8103E", RL_MTU },
+	{ RL_HWREV_8401E, RL_8169, "8401E", RL_MTU },
 	{ RL_HWREV_8105E, RL_8169, "8105E", RL_MTU },
 	{ RL_HWREV_8168B_SPIN2, RL_8169, "8168", RL_JUMBO_MTU },
 	{ RL_HWREV_8168B_SPIN3, RL_8169, "8168", RL_JUMBO_MTU },
@@ -1377,6 +1378,7 @@ re_attach(device_t dev)
 		    RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP |
 		    RL_FLAG_AUTOPAD | RL_FLAG_MACSLEEP;
 		break;
+	case RL_HWREV_8401E:
 	case RL_HWREV_8105E:
 		sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM |
 		    RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
@@ -1502,8 +1504,11 @@ re_attach(device_t dev)
 	}
 
 	/* Take PHY out of power down mode. */
-	if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0)
+	if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) {
 		CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80);
+		if (hw_rev->rl_rev == RL_HWREV_8401E)
+			CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) & ~0x08);
+	}
 	if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) {
 		re_gmii_writereg(dev, 1, 0x1f, 0);
 		re_gmii_writereg(dev, 1, 0x0e, 0);

Modified: stable/8/sys/pci/if_rlreg.h
==============================================================================
--- stable/8/sys/pci/if_rlreg.h	Tue Mar  1 00:05:46 2011	(r219115)
+++ stable/8/sys/pci/if_rlreg.h	Tue Mar  1 00:07:38 2011	(r219116)
@@ -160,6 +160,7 @@
 #define	RL_HWREV_8110S		0x04000000
 #define	RL_HWREV_8169_8110SB	0x10000000
 #define	RL_HWREV_8169_8110SC	0x18000000
+#define	RL_HWREV_8401E		0x24000000
 #define	RL_HWREV_8102EL		0x24800000
 #define	RL_HWREV_8102EL_SPIN1	0x24C00000
 #define	RL_HWREV_8168D		0x28000000


More information about the svn-src-all mailing list