summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2015-01-28 22:33:03 +0000
committerBrad Smith <brad@cvs.openbsd.org>2015-01-28 22:33:03 +0000
commitf61b92016d6b95eb1ab639792f3f79de3513114a (patch)
tree63d5cb7a5bddbee6171cfa61a069dc9f1e7cf4b7
parent7a157721340fa50018047d038aa566533be205a5 (diff)
- Add PCH2 and PCH LPT to the list of chips capable of only 9K jumbos.
- Updated PBA values for the 82574 controller (20KB) and ICH9/10 with jumbos (14KB). Tested by a few on 82574, ICH9 and PCH LPT From FreeBSD
-rw-r--r--sys/dev/pci/if_em.c14
-rw-r--r--sys/dev/pci/if_em_hw.h4
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index afb71f4e24b..b2c0cc7b2fc 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.290 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_em.c,v 1.291 2015/01/28 22:33:02 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -430,8 +430,10 @@ em_attach(struct device *parent, struct device *self, void *aux)
case em_i350:
case em_ich9lan:
case em_ich10lan:
+ case em_pch2lan:
+ case em_pch_lpt:
case em_80003es2lan:
- /* Limit Jumbo Frame size */
+ /* 9K Jumbo Frame size */
sc->hw.max_frame_size = 9234;
break;
case em_pchlan:
@@ -808,14 +810,18 @@ em_init(void *arg)
pba = E1000_PBA_12K; /* 12K for Rx, 20K for Tx */
break;
case em_82574: /* Total Packet Buffer is 40k */
- pba = E1000_PBA_30K; /* 30K for Rx, 10K for Tx */
+ pba = E1000_PBA_20K; /* 20K for Rx, 20K for Tx */
break;
case em_ich8lan:
pba = E1000_PBA_8K;
break;
case em_ich9lan:
case em_ich10lan:
- pba = E1000_PBA_10K;
+ /* Boost Receive side for jumbo frames */
+ if (sc->hw.max_frame_size > EM_RXBUFFER_4096)
+ pba = E1000_PBA_14K;
+ else
+ pba = E1000_PBA_10K;
break;
case em_pchlan:
case em_pch2lan:
diff --git a/sys/dev/pci/if_em_hw.h b/sys/dev/pci/if_em_hw.h
index 49ede9a9baa..3dd548816ac 100644
--- a/sys/dev/pci/if_em_hw.h
+++ b/sys/dev/pci/if_em_hw.h
@@ -31,7 +31,7 @@
*******************************************************************************/
-/* $OpenBSD: if_em_hw.h,v 1.61 2014/11/05 15:30:17 claudio Exp $ */
+/* $OpenBSD: if_em_hw.h,v 1.62 2015/01/28 22:33:02 brad Exp $ */
/* $FreeBSD: if_em_hw.h,v 1.15 2005/05/26 23:32:02 tackerman Exp $ */
/* if_em_hw.h
@@ -2633,7 +2633,9 @@ struct em_host_command_info {
#define E1000_PBA_8K 0x0008 /* 8KB, default Rx allocation */
#define E1000_PBA_10K 0x000A
#define E1000_PBA_12K 0x000C /* 12KB, default Rx allocation */
+#define E1000_PBA_14K 0x000E /* 14KB */
#define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */
+#define E1000_PBA_20K 0x0014
#define E1000_PBA_22K 0x0016
#define E1000_PBA_24K 0x0018
#define E1000_PBA_26K 0x001A