Author: yongari
Date: Wed Jan 26 21:14:20 2011
New Revision: 217911
URL: http://svn.freebsd.org/changeset/base/217911

Log:
  Add support for RTL8105E PCIe Fast Ethernet controller. It seems
  the controller has a kind of embedded controller/memory and vendor
  applies a large set of magic code via undocumented PHY registers in
  device initialization stage. I guess it's a firmware image for the
  embedded controller in RTL8105E since the code is too big compared
  to other DSP fixups. However I have no idea what that magic code
  does and what's purpose of the embedded controller. Fortunately
  driver seems to still work without loading the firmware.
  
  While I'm here change device description of RTL810xE controller.
  
  H/W donated by:       Realtek Semiconductor Corp.

Modified:
  head/sys/dev/re/if_re.c
  head/sys/pci/if_rlreg.h

Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c     Wed Jan 26 21:07:44 2011        (r217910)
+++ head/sys/dev/re/if_re.c     Wed Jan 26 21:14:20 2011        (r217911)
@@ -177,7 +177,7 @@ static struct rl_type re_devs[] = {
        { RT_VENDORID, RT_DEVICEID_8139, 0,
            "RealTek 8139C+ 10/100BaseTX" },
        { RT_VENDORID, RT_DEVICEID_8101E, 0,
-           "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" },
+           "RealTek 810xE PCIe 10/100baseTX" },
        { RT_VENDORID, RT_DEVICEID_8168, 0,
            "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" },
        { RT_VENDORID, RT_DEVICEID_8169, 0,
@@ -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_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 },
        { RL_HWREV_8168C, RL_8169, "8168C/8111C", RL_JUMBO_MTU_6K },
@@ -1376,6 +1377,11 @@ re_attach(device_t dev)
                    RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP |
                    RL_FLAG_AUTOPAD | RL_FLAG_MACSLEEP;
                break;
+       case RL_HWREV_8105E:
+               sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM |
+                   RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
+                   RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD;
+               break;
        case RL_HWREV_8168B_SPIN1:
        case RL_HWREV_8168B_SPIN2:
                sc->rl_flags |= RL_FLAG_WOLRXENB;

Modified: head/sys/pci/if_rlreg.h
==============================================================================
--- head/sys/pci/if_rlreg.h     Wed Jan 26 21:07:44 2011        (r217910)
+++ head/sys/pci/if_rlreg.h     Wed Jan 26 21:14:20 2011        (r217911)
@@ -176,6 +176,7 @@
 #define        RL_HWREV_8168C          0x3C000000
 #define        RL_HWREV_8168C_SPIN2    0x3C400000
 #define        RL_HWREV_8168CP         0x3C800000
+#define        RL_HWREV_8105E          0x40800000
 #define        RL_HWREV_8139           0x60000000
 #define        RL_HWREV_8139A          0x70000000
 #define        RL_HWREV_8139AG         0x70800000
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to