Fixes for re(4) chip identification.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fixes for re(4) chip identification.

Brad Smith-14
Some fixes for re(4) chipset identification..

- Rename 8168 revision entries to 8168B to reflect proper naming.  From FreeBSD
- Change 8168C_SPIN2 rev string to differentiate from the first rev.
- Change 8169SBL ident string to also mention the 8110 chipset so the
  naming is consistent with the same family of chipsets.
- Remove tab in front of 8103E define in the header.


Index: re.c
===================================================================
RCS file: /home/cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.136
diff -u -p -r1.136 re.c
--- re.c 15 Jun 2011 13:19:19 -0000 1.136
+++ re.c 15 Jun 2011 22:37:37 -0000
@@ -230,11 +230,11 @@ static const struct re_revision {
  { RL_HWREV_8103E,       "RTL8103E" },
  { RL_HWREV_8110S, "RTL8110S" },
  { RL_HWREV_8139CPLUS, "RTL8139C+" },
- { RL_HWREV_8168_SPIN1, "RTL8168 1" },
- { RL_HWREV_8168_SPIN2, "RTL8168 2" },
- { RL_HWREV_8168_SPIN3, "RTL8168 3" },
+ { RL_HWREV_8168B_SPIN1, "RTL8168B 1" },
+ { RL_HWREV_8168B_SPIN2, "RTL8168B 2" },
+ { RL_HWREV_8168B_SPIN3, "RTL8168B 3" },
  { RL_HWREV_8168C, "RTL8168C/8111C" },
- { RL_HWREV_8168C_SPIN2, "RTL8168C/8111C" },
+ { RL_HWREV_8168C_SPIN2, "RTL8168C/8111C 2" },
  { RL_HWREV_8168CP, "RTL8168CP/8111CP" },
  { RL_HWREV_8105E, "RTL8105E" },
  { RL_HWREV_8168D, "RTL8168D/8111D" },
@@ -243,7 +243,7 @@ static const struct re_revision {
  { RL_HWREV_8168E_VL, "RTL8168E/8111E-VL" },
  { RL_HWREV_8169, "RTL8169" },
  { RL_HWREV_8169_8110SB, "RTL8169/8110SB" },
- { RL_HWREV_8169_8110SBL, "RTL8169SBL" },
+ { RL_HWREV_8169_8110SBL, "RTL8169/8110SBL" },
  { RL_HWREV_8169_8110SCd, "RTL8169/8110SCd" },
  { RL_HWREV_8169_8110SCe, "RTL8169/8110SCe" },
  { RL_HWREV_8169S, "RTL8169S" },
Index: rtl81x9reg.h
===================================================================
RCS file: /home/cvs/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.74
diff -u -p -r1.74 rtl81x9reg.h
--- rtl81x9reg.h 14 Apr 2011 21:06:38 -0000 1.74
+++ rtl81x9reg.h 15 Jun 2011 22:39:22 -0000
@@ -172,13 +172,13 @@
 #define RL_HWREV_8168DP 0x28800000
 #define RL_HWREV_8168E 0x2C000000
 #define RL_HWREV_8168E_VL 0x2C800000
-#define RL_HWREV_8168_SPIN1 0x30000000
+#define RL_HWREV_8168B_SPIN1 0x30000000
 #define RL_HWREV_8100E_SPIN1 0x30800000
 #define RL_HWREV_8101E 0x34000000
 #define RL_HWREV_8102E 0x34800000
-#define RL_HWREV_8103E 0x34C00000
-#define RL_HWREV_8168_SPIN2 0x38000000
-#define RL_HWREV_8168_SPIN3 0x38400000
+#define RL_HWREV_8103E 0x34C00000
+#define RL_HWREV_8168B_SPIN2 0x38000000
+#define RL_HWREV_8168B_SPIN3 0x38400000
 #define RL_HWREV_8100E_SPIN2 0x38800000
 #define RL_HWREV_8168C 0x3c000000
 #define RL_HWREV_8168C_SPIN2 0x3c400000

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: Fixes for re(4) chip identification.

Jonathan Gray
On Wed, Jun 22, 2011 at 11:55:20PM -0400, Brad wrote:
> Some fixes for re(4) chipset identification..
>
> - Rename 8168 revision entries to 8168B to reflect proper naming.  From FreeBSD
> - Change 8168C_SPIN2 rev string to differentiate from the first rev.
> - Change 8169SBL ident string to also mention the 8110 chipset so the
>   naming is consistent with the same family of chipsets.
> - Remove tab in front of 8103E define in the header.

If you want to do this it makes more sense to sync to realtek strings
than the FreeBSD ones:

8169

0x00000000 RTL8169 CFG_METHOD_1
0x00800000 RTL8169S/8110S CFG_METHOD_2
0x04000000 RTL8169S/8110S CFG_METHOD_3
0x10000000 RTL8169SB/8110SB CFG_METHOD_4
0x18000000 RTL8169SC/8110SC CFG_METHOD_5
0x98000000 RTL8169SC/8110SC CFG_METHOD_6

8168

0x30000000 RTL8168B/8111B  CFG_METHOD_1
0x38000000
        ICVerID == 0x00000000 RTL8168B/8111B CFG_METHOD_2
        ICVerID == 0x00500000 RTL8168B/8111B CFG_METHOD_3
        else RTL8168B/8111B CFG_METHOD_3
0x3C000000
        ICVerID == 0x00000000 RTL8168C/8111C CFG_METHOD_4
        ICVerID == 0x00200000 RTL8168C/8111C CFG_METHOD_5
        ICVerID == 0x00400000 RTL8168C/8111C CFG_METHOD_6
        else RTL8168C/8111C CFG_METHOD_6
0x3C800000
        ICVerID == 0x00100000 RTL8168CP/8111CP CFG_METHOD_7
        ICVerID == 0x00300000 RTL8168CP/8111CP CFG_METHOD_8
        else RTL8168CP/8111CP CFG_METHOD_8
0x28000000
        ICVerID == 0x00100000 RTL8168D/8111D CFG_METHOD_9
        ICVerID == 0x00300000 RTL8168D/8111D CFG_METHOD_10
        else RTL8168D/8111D CFG_METHOD_10
0x28800000
        ICVerID == 0x00000000 RTL8168DP/8111DP CFG_METHOD_11
        ICVerID == 0x00200000 RTL8168DP/8111DP CFG_METHOD_12
        else RTL8168DP/8111DP CFG_METHOD_13
0x2C000000
        ICVerID == 0x00100000 RTL8168E/8111E CFG_METHOD_14
        ICVerID == 0x00200000 RTL8168E/8111E CFG_METHOD_15
0x2C800000
        ICVerID == 0x00000000 RTL8168E-VL/8111E-VL CFG_METHOD_16
        ICVerID == 0x00100000 RTL8168E-VL/8111E-VL CFG_METHOD_17
0x48800000 RTL8168E-VL/8111E-VL CFG_METHOD_17
0x48000000
        ICVerID == 0x00000000 RTL8168F/8111F CFG_METHOD_18
       

r8101

0x34000000
        ICVerID == 0x00000000 RTL8101E CFG_METHOD_1
        ICVerID == 0x00200000 RTL8101E CFG_METHOD_2
        ICVerID == 0x00300000 RTL8101E CFG_METHOD_3
        else RTL8101E CFG_METHOD_3
0x34800000
0x24800000
        ICVerID == 0x00100000 RTL8102E CFG_METHOD_4
        ICVerID == 0x00200000 RTL8102E CFG_METHOD_5
        ICVerID == 0x00400000 RTL8103E CFG_METHOD_6
        ICVerID == 0x00500000 RTL8103E CFG_METHOD_7
        ICVerID == 0x00600000 RTL8103E CFG_METHOD_8
        else RTL8103E CFG_METHOD_8
0x24000000 RTL8401E CFG_METHOD_9
0x2C000000 RTL8105E CFG_METHOD_10
0x40800000
        ICVerID == 0x00100000 RTL8105E CFG_METHOD_11
        ICVerID == 0x00200000 RTL8105E CFG_METHOD_12