summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/igb/igb_main.c
diff options
context:
space:
mode:
authorPaul Guo <Paul.Guo@Sun.COM>2009-03-27 11:13:42 +0800
committerPaul Guo <Paul.Guo@Sun.COM>2009-03-27 11:13:42 +0800
commitd11274aa6f1c1462c11e04d3da70b7453f6f0ebd (patch)
treef0a4f031c25d30a7ad9ac2648e28cf154e4e97aa /usr/src/uts/common/io/igb/igb_main.c
parent582c04d6384a328181b0326e02872a0f85d04e05 (diff)
downloadillumos-gate-d11274aa6f1c1462c11e04d3da70b7453f6f0ebd.tar.gz
6708293 igb needs to support LSO
Diffstat (limited to 'usr/src/uts/common/io/igb/igb_main.c')
-rw-r--r--usr/src/uts/common/io/igb/igb_main.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/usr/src/uts/common/io/igb/igb_main.c b/usr/src/uts/common/io/igb/igb_main.c
index 9e75df9ff5..e23d34949a 100644
--- a/usr/src/uts/common/io/igb/igb_main.c
+++ b/usr/src/uts/common/io/igb/igb_main.c
@@ -23,13 +23,13 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms of the CDDL.
+ * Use is subject to license terms.
*/
#include "igb_sw.h"
static char ident[] = "Intel 1Gb Ethernet";
-static char igb_version[] = "igb 1.1.5";
+static char igb_version[] = "igb 1.1.6";
/*
* Local function protoypes
@@ -891,6 +891,11 @@ igb_init_driver_settings(igb_t *igb)
}
/*
+ * Get the system page size
+ */
+ igb->page_size = ddi_ptob(igb->dip, (ulong_t)1);
+
+ /*
* Set rx buffer size
* The IP header alignment room is counted in the calculation.
* The rx buffer size is in unit of 1K that is required by the
@@ -2109,19 +2114,16 @@ igb_setup_tx_ring(igb_tx_ring_t *tx_ring)
}
/*
- * Initialize hardware checksum offload settings
- */
- tx_ring->hcksum_context.hcksum_flags = 0;
- tx_ring->hcksum_context.ip_hdr_len = 0;
- tx_ring->hcksum_context.mac_hdr_len = 0;
- tx_ring->hcksum_context.l4_proto = 0;
-
- /*
* Enable TXDCTL per queue
*/
reg_val = E1000_READ_REG(hw, E1000_TXDCTL(tx_ring->index));
reg_val |= E1000_TXDCTL_QUEUE_ENABLE;
E1000_WRITE_REG(hw, E1000_TXDCTL(tx_ring->index), reg_val);
+
+ /*
+ * Initialize hardware checksum offload settings
+ */
+ bzero(&tx_ring->tx_context, sizeof (tx_context_t));
}
static void
@@ -2694,10 +2696,17 @@ igb_get_conf(igb_t *igb)
igb->rx_hcksum_enable = igb_get_prop(igb, PROP_RX_HCKSUM_ENABLE,
0, 1, 1);
igb->lso_enable = igb_get_prop(igb, PROP_LSO_ENABLE,
- 0, 1, 0);
+ 0, 1, 1);
igb->tx_head_wb_enable = igb_get_prop(igb, PROP_TX_HEAD_WB_ENABLE,
0, 1, 1);
+ /*
+ * igb LSO needs the tx h/w checksum support.
+ * Here LSO will be disabled if tx h/w checksum has been disabled.
+ */
+ if (igb->tx_hcksum_enable == B_FALSE)
+ igb->lso_enable = B_FALSE;
+
igb->tx_copy_thresh = igb_get_prop(igb, PROP_TX_COPY_THRESHOLD,
MIN_TX_COPY_THRESHOLD, MAX_TX_COPY_THRESHOLD,
DEFAULT_TX_COPY_THRESHOLD);