Set ICH9 and ICH10's PBA size to 14K if the RX buffer size is

more than 4096. Almost the Same as other OSes
This commit is contained in:
msaitoh 2015-05-04 06:51:08 +00:00
parent e3ceee8fd3
commit 215bd2a43d
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wm.c,v 1.317 2015/05/04 06:44:13 msaitoh Exp $ */
/* $NetBSD: if_wm.c,v 1.318 2015/05/04 06:51:08 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.317 2015/05/04 06:44:13 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.318 2015/05/04 06:51:08 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@ -3485,7 +3485,8 @@ wm_reset(struct wm_softc *sc)
break;
case WM_T_ICH9:
case WM_T_ICH10:
sc->sc_pba = PBA_10K;
sc->sc_pba = sc->sc_ethercom.ec_if.if_mtu > 4096 ?
PBA_14K : PBA_10K;
break;
case WM_T_PCH:
case WM_T_PCH2:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wmreg.h,v 1.67 2015/05/04 06:44:13 msaitoh Exp $ */
/* $NetBSD: if_wmreg.h,v 1.68 2015/05/04 06:51:08 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -667,6 +667,7 @@ struct livengood_tcpip_ctxdesc {
#define PBA_8K 0x0008
#define PBA_10K 0x000a
#define PBA_12K 0x000c
#define PBA_14K 0x000e
#define PBA_16K 0x0010 /* 16K, default Tx allocation */
#define PBA_20K 0x0014
#define PBA_22K 0x0016