Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Set ICH9 and ICH10's PBA size to 14K if the RX b...



details:   https://anonhg.NetBSD.org/src/rev/7371c08820b0
branches:  trunk
changeset: 337942:7371c08820b0
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon May 04 06:51:08 2015 +0000

description:
Set ICH9 and ICH10's PBA size to 14K if the RX buffer size is
more than 4096. Almost the Same as other OSes

diffstat:

 sys/dev/pci/if_wm.c    |  7 ++++---
 sys/dev/pci/if_wmreg.h |  3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r ed7fba7fe5f9 -r 7371c08820b0 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon May 04 06:44:13 2015 +0000
+++ b/sys/dev/pci/if_wm.c       Mon May 04 06:51:08 2015 +0000
@@ -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 @@
                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:
diff -r ed7fba7fe5f9 -r 7371c08820b0 sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h    Mon May 04 06:44:13 2015 +0000
+++ b/sys/dev/pci/if_wmreg.h    Mon May 04 06:51:08 2015 +0000
@@ -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 @@
 #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



Home | Main Index | Thread Index | Old Index