Module Name: src
Committed By: tsutsui
Date: Fri Apr 17 15:37:43 UTC 2009
Modified Files:
src/sys/dev/ic: i82557reg.h
src/sys/dev/pci: if_fxp_pci.c
Log Message:
Check revisions and print names of i82551/i82551ER, per Intel manual.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/i82557reg.h
cvs rdiff -u -r1.68 -r1.69 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/i82557reg.h
diff -u src/sys/dev/ic/i82557reg.h:1.23 src/sys/dev/ic/i82557reg.h:1.24
--- src/sys/dev/ic/i82557reg.h:1.23 Wed Mar 11 13:12:41 2009
+++ src/sys/dev/ic/i82557reg.h Fri Apr 17 15:37:43 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: i82557reg.h,v 1.23 2009/03/11 13:12:41 tsutsui Exp $ */
+/* $NetBSD: i82557reg.h,v 1.24 2009/04/17 15:37:43 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
@@ -529,3 +529,4 @@
#define FXP_REV_82559S_A 9
#define FXP_REV_82550 12
#define FXP_REV_82550_C 13
+#define FXP_REV_82551 15
Index: src/sys/dev/pci/if_fxp_pci.c
diff -u src/sys/dev/pci/if_fxp_pci.c:1.68 src/sys/dev/pci/if_fxp_pci.c:1.69
--- src/sys/dev/pci/if_fxp_pci.c:1.68 Thu Apr 16 12:41:51 2009
+++ src/sys/dev/pci/if_fxp_pci.c Fri Apr 17 15:37:43 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fxp_pci.c,v 1.68 2009/04/16 12:41:51 tsutsui Exp $ */
+/* $NetBSD: if_fxp_pci.c,v 1.69 2009/04/17 15:37:43 tsutsui 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.68 2009/04/16 12:41:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.69 2009/04/17 15:37:43 tsutsui Exp $");
#include "rnd.h"
@@ -252,6 +252,7 @@
pci_chipset_tag_t pc = pa->pa_pc;
pci_intr_handle_t ih;
const struct fxp_pci_product *fpp;
+ const char *chipname = NULL;
const char *intrstr = NULL;
bus_space_tag_t iot, memt;
bus_space_handle_t ioh, memh;
@@ -329,8 +330,6 @@
switch (fpp->fpp_prodid) {
case PCI_PRODUCT_INTEL_82557:
case PCI_PRODUCT_INTEL_IN_BUSINESS:
- {
- const char *chipname = NULL;
if (sc->sc_rev >= FXP_REV_82558_A4) {
chipname = "i82558 Ethernet";
@@ -352,6 +351,8 @@
sc->sc_flags &= ~FXPF_82559_RXCSUM;
sc->sc_flags |= FXPF_EXT_RFA;
}
+ if (sc->sc_rev >= FXP_REV_82551)
+ chipname = "i82551 Ethernet";
/*
* Mark all i82559 and i82550 revisions as having
@@ -363,13 +364,12 @@
aprint_normal(": %s, rev %d\n", chipname != NULL ? chipname :
fpp->fpp_name, sc->sc_rev);
break;
- }
case PCI_PRODUCT_INTEL_82559ER:
sc->sc_flags |= FXPF_FC|FXPF_EXT_TXCB;
/*
- * i82559ER doesn't support RX hardware checksumming
+ * i82559ER/82551ER don't support RX hardware checksumming
* even though it has a newer revision number than 82559_A0.
*/
@@ -380,7 +380,11 @@
if (pa->pa_flags & PCI_FLAGS_MWI_OKAY)
sc->sc_flags |= FXPF_MWI;
- aprint_normal(": %s, rev %d\n", fpp->fpp_name, sc->sc_rev);
+ if (sc->sc_rev >= FXP_REV_82551)
+ chipname = "Intel i82551ER Ethernet";
+
+ aprint_normal(": %s, rev %d\n", chipname != NULL ? chipname :
+ fpp->fpp_name, sc->sc_rev);
break;
case PCI_PRODUCT_INTEL_82801BA_LAN: