Module Name: src
Committed By: msaitoh
Date: Fri Sep 2 03:16:19 UTC 2011
Modified Files:
src/sys/dev/ic: i82557.c i82557reg.h
src/sys/dev/microcode/i8255x: rcvbundl.h
src/sys/dev/pci: if_fxp_pci.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/ic/i82557.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/i82557reg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/microcode/i8255x/rcvbundl.h
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/if_fxp_pci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/i82557.c
diff -u src/sys/dev/ic/i82557.c:1.137 src/sys/dev/ic/i82557.c:1.138
--- src/sys/dev/ic/i82557.c:1.137 Wed Mar 30 17:52:45 2011
+++ src/sys/dev/ic/i82557.c Fri Sep 2 03:16:18 2011
@@ -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 }
};
Index: src/sys/dev/ic/i82557reg.h
diff -u src/sys/dev/ic/i82557reg.h:1.24 src/sys/dev/ic/i82557reg.h:1.25
--- src/sys/dev/ic/i82557reg.h:1.24 Fri Apr 17 15:37:43 2009
+++ src/sys/dev/ic/i82557reg.h Fri Sep 2 03:16:19 2011
@@ -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 */
Index: src/sys/dev/microcode/i8255x/rcvbundl.h
diff -u src/sys/dev/microcode/i8255x/rcvbundl.h:1.3 src/sys/dev/microcode/i8255x/rcvbundl.h:1.4
--- src/sys/dev/microcode/i8255x/rcvbundl.h:1.3 Sun Dec 11 12:22:27 2005
+++ src/sys/dev/microcode/i8255x/rcvbundl.h Fri Sep 2 03:16:18 2011
@@ -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, \
+}
Index: src/sys/dev/pci/if_fxp_pci.c
diff -u src/sys/dev/pci/if_fxp_pci.c:1.75 src/sys/dev/pci/if_fxp_pci.c:1.76
--- src/sys/dev/pci/if_fxp_pci.c:1.75 Tue May 17 17:34:54 2011
+++ src/sys/dev/pci/if_fxp_pci.c Fri Sep 2 03:16:18 2011
@@ -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" },
+ { PCI_PRODUCT_INTEL_82801E_LAN_2,
+ "Intel i82801E Ethernet" },
{ PCI_PRODUCT_INTEL_82801EB_LAN,
"Intel 82801EB/ER (ICH5) Network Controller" },
{ PCI_PRODUCT_INTEL_82801FB_LAN,
- "Intel 82562EZ (ICH6)" },
+ "Intel i82801FB LAN Controller" },
+ { PCI_PRODUCT_INTEL_82801FB_LAN_2,
+ "Intel i82801FB LAN Controller" },
{ PCI_PRODUCT_INTEL_82801G_LAN,
"Intel 82801GB/GR (ICH7) Network Controller" },
{ PCI_PRODUCT_INTEL_82801GB_LAN,
@@ -369,7 +401,7 @@
sc->sc_flags &= ~FXPF_82559_RXCSUM;
sc->sc_flags |= FXPF_EXT_RFA;
}
- if (sc->sc_rev >= FXP_REV_82551)
+ if (sc->sc_rev >= FXP_REV_82551_E)
chipname = "i82551 Ethernet";
/*
@@ -398,7 +430,7 @@
if (pa->pa_flags & PCI_FLAGS_MWI_OKAY)
sc->sc_flags |= FXPF_MWI;
- if (sc->sc_rev >= FXP_REV_82551)
+ if (sc->sc_rev >= FXP_REV_82551_E)
chipname = "Intel i82551ER Ethernet";
aprint_normal(": %s, rev %d\n", chipname != NULL ? chipname :