Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Add support for some fxp devices from FreeBSD and Op...



details:   https://anonhg.NetBSD.org/src/rev/103640d9aafd
branches:  trunk
changeset: 769176:103640d9aafd
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Sep 02 03:16:18 2011 +0000

description:
Add support for some fxp devices from FreeBSD and OpenBSD.
{Free,Open}BSD say that we have to do some work to make fxp
stable.

diffstat:

 sys/dev/ic/i82557.c                 |   11 ++-
 sys/dev/ic/i82557reg.h              |    6 +-
 sys/dev/microcode/i8255x/rcvbundl.h |  149 +++++++++++++++++++++++++++++++++++-
 sys/dev/pci/if_fxp_pci.c            |   54 ++++++++++--
 4 files changed, 204 insertions(+), 16 deletions(-)

diffs (truncated from 330 to 300 lines):

diff -r 8bea3a9c35b1 -r 103640d9aafd sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Fri Sep 02 03:10:37 2011 +0000
+++ b/sys/dev/ic/i82557.c       Fri Sep 02 03:16:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.137 2011/03/30 17:52:45 jakllsch Exp $    */
+/*     $NetBSD: i82557.c,v 1.138 2011/09/02 03:16:18 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.137 2011/03/30 17:52:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.138 2011/09/02 03:16:18 msaitoh Exp $");
 
 #include "rnd.h"
 
@@ -2329,6 +2329,7 @@
 static const uint32_t fxp_ucode_d101s[] = D101S_RCVBUNDLE_UCODE;
 static const uint32_t fxp_ucode_d102[] = D102_B_RCVBUNDLE_UCODE;
 static const uint32_t fxp_ucode_d102c[] = D102_C_RCVBUNDLE_UCODE;
+static const uint32_t fxp_ucode_d102e[] = D102_E_RCVBUNDLE_UCODE;
 
 #define        UCODE(x)        x, sizeof(x)/sizeof(uint32_t)
 
@@ -2357,6 +2358,12 @@
        { FXP_REV_82550_C, UCODE(fxp_ucode_d102c),
          D102_C_CPUSAVER_DWORD, D102_C_CPUSAVER_BUNDLE_MAX_DWORD },
 
+       { FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
+           D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
+
+       { FXP_REV_82551_10, UCODE(fxp_ucode_d102e),
+           D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
+
        { 0, NULL, 0, 0, 0 }
 };
 
diff -r 8bea3a9c35b1 -r 103640d9aafd sys/dev/ic/i82557reg.h
--- a/sys/dev/ic/i82557reg.h    Fri Sep 02 03:10:37 2011 +0000
+++ b/sys/dev/ic/i82557reg.h    Fri Sep 02 03:16:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557reg.h,v 1.24 2009/04/17 15:37:43 tsutsui Exp $   */
+/*     $NetBSD: i82557reg.h,v 1.25 2011/09/02 03:16:19 msaitoh Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
@@ -529,4 +529,6 @@
 #define        FXP_REV_82559S_A        9
 #define        FXP_REV_82550           12
 #define        FXP_REV_82550_C         13
-#define        FXP_REV_82551           15
+#define        FXP_REV_82551_E         14      /* 82551 */
+#define        FXP_REV_82551_F         15
+#define        FXP_REV_82551_10        16      /* 82551 */
diff -r 8bea3a9c35b1 -r 103640d9aafd sys/dev/microcode/i8255x/rcvbundl.h
--- a/sys/dev/microcode/i8255x/rcvbundl.h       Fri Sep 02 03:10:37 2011 +0000
+++ b/sys/dev/microcode/i8255x/rcvbundl.h       Fri Sep 02 03:16:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcvbundl.h,v 1.3 2005/12/11 12:22:27 christos Exp $    */
+/*     $NetBSD: rcvbundl.h,v 1.4 2011/09/02 03:16:18 msaitoh Exp $     */
 
 /*
 Copyright (c) 1999-2001, Intel Corporation
@@ -1126,3 +1126,150 @@
 0x00000000, \
 0x00000000, \
 }
+
+/********************************************************/
+/*  Micro code for the D102 E-step                      */
+/********************************************************/
+
+/*  Parameter values for the D102 E-step  */
+#define D102_E_CPUSAVER_DWORD                  42
+#define D102_E_CPUSAVER_BUNDLE_MAX_DWORD       54
+#define D102_E_CPUSAVER_MIN_SIZE_DWORD         46
+
+#define     D102_E_RCVBUNDLE_UCODE \
+{\
+0x007D028F, \
+0x0E4204F9, \
+0x14ED0C85, \
+0x14FA14E9, \
+0x0EF70E36, \
+0x1FFF1FFF, \
+0x00E014B9, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00E014BD, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00E014D5, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00E014C1, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00E014C8, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00200600, \
+0x00E014EE, \
+0x00000000, \
+0x00000000, \
+0x0030FF80, \
+0x00940E46, \
+0x00038200, \
+0x00102000, \
+0x00E00E43, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00300006, \
+0x00E014FB, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00906E41, \
+0x00800E3C, \
+0x00E00E39, \
+0x00000000, \
+0x00906EFD, \
+0x00900EFD, \
+0x00E00EF8, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+0x00000000, \
+}
diff -r 8bea3a9c35b1 -r 103640d9aafd sys/dev/pci/if_fxp_pci.c
--- a/sys/dev/pci/if_fxp_pci.c  Fri Sep 02 03:10:37 2011 +0000
+++ b/sys/dev/pci/if_fxp_pci.c  Fri Sep 02 03:16:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_fxp_pci.c,v 1.75 2011/05/17 17:34:54 dyoung Exp $   */
+/*     $NetBSD: if_fxp_pci.c,v 1.76 2011/09/02 03:16:18 msaitoh Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.75 2011/05/17 17:34:54 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.76 2011/09/02 03:16:18 msaitoh Exp $");
 
 #include "rnd.h"
 
@@ -100,18 +100,16 @@
        uint32_t        fpp_prodid;     /* PCI product ID */
        const char      *fpp_name;      /* device name */
 } fxp_pci_products[] = {
+       { PCI_PRODUCT_INTEL_82552,
+         "Intel i82552 10/100 Network Connection" },
        { PCI_PRODUCT_INTEL_82557,
          "Intel i82557 Ethernet" },
        { PCI_PRODUCT_INTEL_82559ER,
          "Intel i82559ER Ethernet" },
        { PCI_PRODUCT_INTEL_IN_BUSINESS,
          "Intel InBusiness Ethernet" },
-       { PCI_PRODUCT_INTEL_82801BA_LAN,
-         "Intel i82562 Ethernet" },
-       { PCI_PRODUCT_INTEL_82801E_LAN_1,
-         "Intel i82801E Ethernet" },
-       { PCI_PRODUCT_INTEL_82801E_LAN_2,
-         "Intel i82801E Ethernet" },
+       { PCI_PRODUCT_INTEL_PRO_100,
+         "Intel PRO/100 Ethernet" },
        { PCI_PRODUCT_INTEL_PRO_100_VE_0,
          "Intel PRO/100 VE Network Controller" },
        { PCI_PRODUCT_INTEL_PRO_100_VE_1,
@@ -130,6 +128,12 @@
          "Intel PRO/100 VE Network Controller" },
        { PCI_PRODUCT_INTEL_PRO_100_VE_8,
          "Intel PRO/100 VE Network Controller" },
+       { PCI_PRODUCT_INTEL_PRO_100_VE_9,
+         "Intel PRO/100 VE Network Controller" },
+       { PCI_PRODUCT_INTEL_PRO_100_VE_10,
+         "Intel PRO/100 VE Network Controller" },
+       { PCI_PRODUCT_INTEL_PRO_100_VE_11,
+         "Intel PRO/100 VE Network Controller" },
        { PCI_PRODUCT_INTEL_PRO_100_VM_0,
          "Intel PRO/100 VM Network Controller" },
        { PCI_PRODUCT_INTEL_PRO_100_VM_1,
@@ -144,12 +148,40 @@
          "Intel PRO/100 VM (MOB) Network Controller" },
        { PCI_PRODUCT_INTEL_PRO_100_VM_6,
          "Intel PRO/100 VM Network Controller with 82562ET/EZ PHY" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_7,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_8,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_9,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_10,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_11,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_12,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_13,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_14,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_15,
+         "Intel PRO/100 VM Network Connection" },
+       { PCI_PRODUCT_INTEL_PRO_100_VM_16,
+         "Intel PRO/100 VM Network Connection" },
        { PCI_PRODUCT_INTEL_PRO_100_M,
          "Intel PRO/100 M Network Controller" },
+       { PCI_PRODUCT_INTEL_82801BA_LAN,
+         "Intel i82562 Ethernet" },
+       { PCI_PRODUCT_INTEL_82801E_LAN_1,
+         "Intel i82801E Ethernet" },



Home | Main Index | Thread Index | Old Index