Mon Mar 5 20:31:49 2012 UTC ()
Pull up the following revisions(s) (requested by nonaka in ticket #83):
	sys/dev/ic/rtl8169.c:	revision 1.135
	sys/dev/ic/rtl81x9reg.h:	revision 1.43

Add RTL8168E/8111E-VL support.


(sborrill)
diff -r1.134 -r1.134.4.1 src/sys/dev/ic/rtl8169.c
diff -r1.42 -r1.42.4.1 src/sys/dev/ic/rtl81x9reg.h

cvs diff -r1.134 -r1.134.4.1 src/sys/dev/ic/rtl8169.c (expand / switch to unified diff)

--- src/sys/dev/ic/rtl8169.c 2011/11/22 18:42:56 1.134
+++ src/sys/dev/ic/rtl8169.c 2012/03/05 20:31:49 1.134.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rtl8169.c,v 1.134 2011/11/22 18:42:56 garbled Exp $ */ 1/* $NetBSD: rtl8169.c,v 1.134.4.1 2012/03/05 20:31:49 sborrill Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997, 1998-2003 4 * Copyright (c) 1997, 1998-2003
5 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * Bill Paul <wpaul@windriver.com>. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 25 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
26 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 * THE POSSIBILITY OF SUCH DAMAGE. 32 * THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.134 2011/11/22 18:42:56 garbled Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.134.4.1 2012/03/05 20:31:49 sborrill Exp $");
37/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ 37/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
38 38
39/* 39/*
40 * RealTek 8139C+/8169/8169S/8110S PCI NIC driver 40 * RealTek 8139C+/8169/8169S/8110S PCI NIC driver
41 * 41 *
42 * Written by Bill Paul <wpaul@windriver.com> 42 * Written by Bill Paul <wpaul@windriver.com>
43 * Senior Networking Software Engineer 43 * Senior Networking Software Engineer
44 * Wind River Systems 44 * Wind River Systems
45 */ 45 */
46 46
47/* 47/*
48 * This driver is designed to support RealTek's next generation of 48 * This driver is designed to support RealTek's next generation of
49 * 10/100 and 10/100/1000 PCI ethernet controllers. There are currently 49 * 10/100 and 10/100/1000 PCI ethernet controllers. There are currently
@@ -596,26 +596,30 @@ re_attach(struct rtk_softc *sc) @@ -596,26 +596,30 @@ re_attach(struct rtk_softc *sc)
596 * checksum offload. So disable jumbo frame until 596 * checksum offload. So disable jumbo frame until
597 * I have better idea what it really requires to 597 * I have better idea what it really requires to
598 * make it support. 598 * make it support.
599 * RTL8168C/CP : supports up to 6KB jumbo frame. 599 * RTL8168C/CP : supports up to 6KB jumbo frame.
600 * RTL8111C/CP : supports up to 9KB jumbo frame. 600 * RTL8111C/CP : supports up to 9KB jumbo frame.
601 */ 601 */
602 sc->sc_quirk |= RTKQ_NOJUMBO; 602 sc->sc_quirk |= RTKQ_NOJUMBO;
603 break; 603 break;
604 case RTK_HWREV_8168E: 604 case RTK_HWREV_8168E:
605 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | 605 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
606 RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM | 606 RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM |
607 RTKQ_NOJUMBO; 607 RTKQ_NOJUMBO;
608 break; 608 break;
 609 case RTK_HWREV_8168E_VL:
 610 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
 611 RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_NOJUMBO;
 612 break;
609 case RTK_HWREV_8100E: 613 case RTK_HWREV_8100E:
610 case RTK_HWREV_8100E_SPIN2: 614 case RTK_HWREV_8100E_SPIN2:
611 case RTK_HWREV_8101E: 615 case RTK_HWREV_8101E:
612 sc->sc_quirk |= RTKQ_NOJUMBO; 616 sc->sc_quirk |= RTKQ_NOJUMBO;
613 break; 617 break;
614 case RTK_HWREV_8102E: 618 case RTK_HWREV_8102E:
615 case RTK_HWREV_8102EL: 619 case RTK_HWREV_8102EL:
616 case RTK_HWREV_8103E: 620 case RTK_HWREV_8103E:
617 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | 621 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
618 RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_NOJUMBO; 622 RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_NOJUMBO;
619 break; 623 break;
620 default: 624 default:
621 aprint_normal_dev(sc->sc_dev, 625 aprint_normal_dev(sc->sc_dev,

cvs diff -r1.42 -r1.42.4.1 src/sys/dev/ic/rtl81x9reg.h (expand / switch to unified diff)

--- src/sys/dev/ic/rtl81x9reg.h 2011/11/22 18:42:57 1.42
+++ src/sys/dev/ic/rtl81x9reg.h 2012/03/05 20:31:49 1.42.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rtl81x9reg.h,v 1.42 2011/11/22 18:42:57 garbled Exp $ */ 1/* $NetBSD: rtl81x9reg.h,v 1.42.4.1 2012/03/05 20:31:49 sborrill Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997, 1998 4 * Copyright (c) 1997, 1998
5 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 5 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -153,26 +153,27 @@ @@ -153,26 +153,27 @@
153#define RTK_LOOPTEST_ON_CPLUS 0x00060000 153#define RTK_LOOPTEST_ON_CPLUS 0x00060000
154 154
155/* Known revision codes. */ 155/* Known revision codes. */
156#define RTK_HWREV_8169 0x00000000 156#define RTK_HWREV_8169 0x00000000
157#define RTK_HWREV_8110S 0x00800000 157#define RTK_HWREV_8110S 0x00800000
158#define RTK_HWREV_8169S 0x04000000 158#define RTK_HWREV_8169S 0x04000000
159#define RTK_HWREV_8169_8110SB 0x10000000 159#define RTK_HWREV_8169_8110SB 0x10000000
160#define RTK_HWREV_8169_8110SC 0x18000000 160#define RTK_HWREV_8169_8110SC 0x18000000
161#define RTK_HWREV_8102EL 0x24800000 161#define RTK_HWREV_8102EL 0x24800000
162#define RTK_HWREV_8103E 0x24C00000 162#define RTK_HWREV_8103E 0x24C00000
163#define RTK_HWREV_8168D 0x28000000 163#define RTK_HWREV_8168D 0x28000000
164#define RTK_HWREV_8168DP 0x28800000 164#define RTK_HWREV_8168DP 0x28800000
165#define RTK_HWREV_8168E 0x2C000000 165#define RTK_HWREV_8168E 0x2C000000
 166#define RTK_HWREV_8168E_VL 0x2C800000
166#define RTK_HWREV_8168_SPIN1 0x30000000 167#define RTK_HWREV_8168_SPIN1 0x30000000
167#define RTK_HWREV_8100E 0x30800000 168#define RTK_HWREV_8100E 0x30800000
168#define RTK_HWREV_8101E 0x34000000 169#define RTK_HWREV_8101E 0x34000000
169#define RTK_HWREV_8102E 0x34800000 170#define RTK_HWREV_8102E 0x34800000
170#define RTK_HWREV_8168_SPIN2 0x38000000 171#define RTK_HWREV_8168_SPIN2 0x38000000
171#define RTK_HWREV_8168_SPIN3 0x38400000 172#define RTK_HWREV_8168_SPIN3 0x38400000
172#define RTK_HWREV_8100E_SPIN2 0x38800000 173#define RTK_HWREV_8100E_SPIN2 0x38800000
173#define RTK_HWREV_8168C 0x3C000000 174#define RTK_HWREV_8168C 0x3C000000
174#define RTK_HWREV_8168C_SPIN2 0x3C400000 175#define RTK_HWREV_8168C_SPIN2 0x3C400000
175#define RTK_HWREV_8168CP 0x3C800000 176#define RTK_HWREV_8168CP 0x3C800000
176#define RTK_HWREV_8139 0x60000000 177#define RTK_HWREV_8139 0x60000000
177#define RTK_HWREV_8139A 0x70000000 178#define RTK_HWREV_8139A 0x70000000
178#define RTK_HWREV_8139AG 0x70800000 179#define RTK_HWREV_8139AG 0x70800000