1/****************************************************************************** 2 3 Copyright (c) 2001-2015, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 --- 16 unchanged lines hidden (view full) --- 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ |
33/*$FreeBSD: head/sys/dev/e1000/if_igb.c 295323 2016-02-05 17:14:37Z erj $*/ |
34 35 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_rss.h" 39 40#ifdef HAVE_KERNEL_OPTION_HEADERS 41#include "opt_device_polling.h" 42#include "opt_altq.h" 43#endif 44 45#include "if_igb.h" 46 47/********************************************************************* 48 * Driver version: 49 *********************************************************************/ |
50char igb_driver_version[] = "2.5.3-k"; |
51 52 53/********************************************************************* 54 * PCI Device ID Table 55 * 56 * Used by probe to select devices to load on 57 * Last field stores an index into e1000_strings 58 * Last entry must be all 0s --- 487 unchanged lines hidden (view full) --- 546 adapter, 0, igb_sysctl_dmac, "I", "DMA Coalesce"); 547 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), 548 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), 549 OID_AUTO, "eee_disabled", CTLTYPE_INT|CTLFLAG_RW, 550 adapter, 0, igb_sysctl_eee, "I", 551 "Disable Energy Efficient Ethernet"); 552 if (adapter->hw.phy.media_type == e1000_media_type_copper) { 553 if (adapter->hw.mac.type == e1000_i354) |
554 e1000_set_eee_i354(&adapter->hw, TRUE, TRUE); |
555 else |
556 e1000_set_eee_i350(&adapter->hw, TRUE, TRUE); |
557 } 558 } 559 560 /* 561 ** Start from a known state, this is 562 ** important in reading the nvm and 563 ** mac from that. 564 */ --- 707 unchanged lines hidden (view full) --- 1272 (adapter->hw.mac.type == e1000_82580)) 1273 ifp->if_hwassist |= CSUM_SCTP; 1274#endif 1275 } 1276 1277 if (ifp->if_capenable & IFCAP_TSO) 1278 ifp->if_hwassist |= CSUM_TSO; 1279 |
1280 /* Clear bad data from Rx FIFOs */ 1281 e1000_rx_fifo_flush_82575(&adapter->hw); 1282 |
1283 /* Configure for OS presence */ 1284 igb_init_manageability(adapter); 1285 1286 /* Prepare transmit descriptors and buffers */ 1287 igb_setup_transmit_structures(adapter); 1288 igb_initialize_transmit_units(adapter); 1289 1290 /* Setup Multicast table */ --- 11 unchanged lines hidden (view full) --- 1302 adapter->rx_mbuf_sz = MJUM9BYTES; 1303 1304 /* Prepare receive descriptors and buffers */ 1305 if (igb_setup_receive_structures(adapter)) { 1306 device_printf(dev, "Could not setup receive structures\n"); 1307 return; 1308 } 1309 igb_initialize_receive_units(adapter); |
1310 1311 /* Enable VLAN support */ 1312 if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) 1313 igb_setup_vlan_hw_support(adapter); 1314 1315 /* Don't lose promiscuous settings */ 1316 igb_set_promisc(adapter); 1317 --- 20 unchanged lines hidden (view full) --- 1338 { 1339 igb_enable_intr(adapter); 1340 E1000_WRITE_REG(&adapter->hw, E1000_ICS, E1000_ICS_LSC); 1341 } 1342 1343 /* Set Energy Efficient Ethernet */ 1344 if (adapter->hw.phy.media_type == e1000_media_type_copper) { 1345 if (adapter->hw.mac.type == e1000_i354) |
1346 e1000_set_eee_i354(&adapter->hw, TRUE, TRUE); |
1347 else |
1348 e1000_set_eee_i350(&adapter->hw, TRUE, TRUE); |
1349 } 1350} 1351 1352static void 1353igb_init(void *arg) 1354{ 1355 struct adapter *adapter = arg; 1356 --- 5039 unchanged lines hidden --- |