Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix RAL_TABSIZE for ICH8, 82576, 82580 and I350.
details: https://anonhg.NetBSD.org/src/rev/0b387d0a441d
branches: trunk
changeset: 784722:0b387d0a441d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Feb 07 15:38:42 2013 +0000
description:
Fix RAL_TABSIZE for ICH8, 82576, 82580 and I350.
diffstat:
sys/dev/pci/if_wm.c | 19 +++++++++++++------
sys/dev/pci/if_wmreg.h | 9 ++++++---
2 files changed, 19 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r 80517c2572f1 -r 0b387d0a441d sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Thu Feb 07 13:57:40 2013 +0000
+++ b/sys/dev/pci/if_wm.c Thu Feb 07 15:38:42 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.241 2013/02/07 02:10:18 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.242 2013/02/07 15:38:42 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.241 2013/02/07 02:10:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.242 2013/02/07 15:38:42 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -5643,10 +5643,17 @@
* Set the station address in the first RAL slot, and
* clear the remaining slots.
*/
- if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
- || (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
- || (sc->sc_type == WM_T_PCH2))
- size = WM_ICH8_RAL_TABSIZE;
+ if (sc->sc_type == WM_T_ICH8)
+ size = WM_RAL_TABSIZE_ICH8 -1;
+ else if ((sc->sc_type == WM_T_ICH9) || (sc->sc_type == WM_T_ICH10)
+ || (sc->sc_type == WM_T_PCH) || (sc->sc_type == WM_T_PCH2))
+ size = WM_RAL_TABSIZE_ICH8;
+ else if (sc->sc_type == WM_T_82575)
+ size = WM_RAL_TABSIZE_82575;
+ else if ((sc->sc_type == WM_T_82576) || (sc->sc_type == WM_T_82580))
+ size = WM_RAL_TABSIZE_82576;
+ else if (sc->sc_type == WM_T_I350)
+ size = WM_RAL_TABSIZE_I350;
else
size = WM_RAL_TABSIZE;
wm_set_ral(sc, CLLADDR(ifp->if_sadl), 0);
diff -r 80517c2572f1 -r 0b387d0a441d sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h Thu Feb 07 13:57:40 2013 +0000
+++ b/sys/dev/pci/if_wmreg.h Thu Feb 07 15:38:42 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wmreg.h,v 1.48 2012/08/29 20:39:24 bouyer Exp $ */
+/* $NetBSD: if_wmreg.h,v 1.49 2013/02/07 15:38:42 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -420,8 +420,11 @@
#define RAL_RDR1 (1U << 30) /* put packet in alt. rx ring */
#define RAL_AV (1U << 31) /* entry is valid */
-#define WM_RAL_TABSIZE 16
-#define WM_ICH8_RAL_TABSIZE 7
+#define WM_RAL_TABSIZE 15 /* RAL size for old devices */
+#define WM_RAL_TABSIZE_ICH8 7 /* RAL size for ICH* and PCH* */
+#define WM_RAL_TABSIZE_82575 16 /* RAL size for 82575 */
+#define WM_RAL_TABSIZE_82576 24 /* RAL size for 82576 and 82580 */
+#define WM_RAL_TABSIZE_I350 32 /* RAL size for I350 */
#define WMREG_ICR 0x00c0 /* Interrupt Cause Register */
#define ICR_TXDW (1U << 0) /* Tx desc written back */
Home |
Main Index |
Thread Index |
Old Index