Mon Apr 13 12:38:06 2009 UTC ()
Assume an unknown HWREV chip has the same features with the latest one.


(tsutsui)
diff -r1.115 -r1.116 src/sys/dev/ic/rtl8169.c

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

--- src/sys/dev/ic/rtl8169.c 2009/04/13 12:33:05 1.115
+++ src/sys/dev/ic/rtl8169.c 2009/04/13 12:38:06 1.116
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rtl8169.c,v 1.115 2009/04/13 12:33:05 tsutsui Exp $ */ 1/* $NetBSD: rtl8169.c,v 1.116 2009/04/13 12:38:06 tsutsui 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.115 2009/04/13 12:33:05 tsutsui Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.116 2009/04/13 12:38:06 tsutsui 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
@@ -628,26 +628,29 @@ re_attach(struct rtk_softc *sc) @@ -628,26 +628,29 @@ re_attach(struct rtk_softc *sc)
628 sc->sc_quirk |= 628 sc->sc_quirk |=
629 RTKQ_DESCV2 | RTKQ_NOEECMD | RTKQ_NOJUMBO; 629 RTKQ_DESCV2 | RTKQ_NOEECMD | RTKQ_NOJUMBO;
630 break; 630 break;
631 case RTK_HWREV_8100E: 631 case RTK_HWREV_8100E:
632 case RTK_HWREV_8100E_SPIN2: 632 case RTK_HWREV_8100E_SPIN2:
633 /* XXX not in the Realtek driver */ 633 /* XXX not in the Realtek driver */
634 sc->sc_rev = 0; 634 sc->sc_rev = 0;
635 sc->sc_quirk |= RTKQ_NOJUMBO; 635 sc->sc_quirk |= RTKQ_NOJUMBO;
636 break; 636 break;
637 default: 637 default:
638 aprint_normal_dev(sc->sc_dev, 638 aprint_normal_dev(sc->sc_dev,
639 "Unknown revision (0x%08x)\n", hwrev); 639 "Unknown revision (0x%08x)\n", hwrev);
640 sc->sc_rev = 0; 640 sc->sc_rev = 0;
 641 /* assume the latest features */
 642 sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD;
 643 sc->sc_quirk |= RTKQ_NOJUMBO;
641 } 644 }
642 645
643 /* Set RX length mask */ 646 /* Set RX length mask */
644 sc->re_rxlenmask = RE_RDESC_STAT_GFRAGLEN; 647 sc->re_rxlenmask = RE_RDESC_STAT_GFRAGLEN;
645 sc->re_ldata.re_tx_desc_cnt = RE_TX_DESC_CNT_8169; 648 sc->re_ldata.re_tx_desc_cnt = RE_TX_DESC_CNT_8169;
646 } else { 649 } else {
647 sc->sc_quirk |= RTKQ_NOJUMBO; 650 sc->sc_quirk |= RTKQ_NOJUMBO;
648 651
649 /* Set RX length mask */ 652 /* Set RX length mask */
650 sc->re_rxlenmask = RE_RDESC_STAT_FRAGLEN; 653 sc->re_rxlenmask = RE_RDESC_STAT_FRAGLEN;
651 sc->re_ldata.re_tx_desc_cnt = RE_TX_DESC_CNT_8139; 654 sc->re_ldata.re_tx_desc_cnt = RE_TX_DESC_CNT_8139;
652 } 655 }
653 656