diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c index a85710565a36..18bd548ba84d 100644 --- a/sys/dev/pci/if_wm.c +++ b/sys/dev/pci/if_wm.c @@ -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 -__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 #include @@ -5643,10 +5643,17 @@ wm_set_filter(struct wm_softc *sc) * 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 --git a/sys/dev/pci/if_wmreg.h b/sys/dev/pci/if_wmreg.h index 77ad447a2709..30bce7657ca6 100644 --- a/sys/dev/pci/if_wmreg.h +++ b/sys/dev/pci/if_wmreg.h @@ -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 @@ struct livengood_tcpip_ctxdesc { #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 */