if_em.c (254262) | if_em.c (254263) |
---|---|
1/****************************************************************************** 2 3 Copyright (c) 2001-2013, 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******************************************************************************/ | 1/****************************************************************************** 2 3 Copyright (c) 2001-2013, 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_em.c 254262 2013-08-12 22:54:38Z jfv $*/ | 33/*$FreeBSD: head/sys/dev/e1000/if_em.c 254263 2013-08-12 23:30:01Z scottl $*/ |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37 38#ifdef HAVE_KERNEL_OPTION_HEADERS 39#include "opt_device_polling.h" 40#endif 41 --- 2395 unchanged lines hidden (view full) --- 2437 * 2438 **********************************************************************/ 2439static void 2440em_identify_hardware(struct adapter *adapter) 2441{ 2442 device_t dev = adapter->dev; 2443 2444 /* Make sure our PCI config space has the necessary stuff set */ | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37 38#ifdef HAVE_KERNEL_OPTION_HEADERS 39#include "opt_device_polling.h" 40#endif 41 --- 2395 unchanged lines hidden (view full) --- 2437 * 2438 **********************************************************************/ 2439static void 2440em_identify_hardware(struct adapter *adapter) 2441{ 2442 device_t dev = adapter->dev; 2443 2444 /* Make sure our PCI config space has the necessary stuff set */ |
2445 pci_enable_busmaster(dev); |
|
2445 adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); | 2446 adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); |
2446 if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && 2447 (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { 2448 device_printf(dev, "Memory Access and/or Bus Master bits " 2449 "were not set!\n"); 2450 adapter->hw.bus.pci_cmd_word |= 2451 (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); 2452 pci_write_config(dev, PCIR_COMMAND, 2453 adapter->hw.bus.pci_cmd_word, 2); 2454 } | |
2455 2456 /* Save off the information about this board */ 2457 adapter->hw.vendor_id = pci_get_vendor(dev); 2458 adapter->hw.device_id = pci_get_device(dev); 2459 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); 2460 adapter->hw.subsystem_vendor_id = 2461 pci_read_config(dev, PCIR_SUBVEND_0, 2); 2462 adapter->hw.subsystem_device_id = --- 3343 unchanged lines hidden --- | 2447 2448 /* Save off the information about this board */ 2449 adapter->hw.vendor_id = pci_get_vendor(dev); 2450 adapter->hw.device_id = pci_get_device(dev); 2451 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); 2452 adapter->hw.subsystem_vendor_id = 2453 pci_read_config(dev, PCIR_SUBVEND_0, 2); 2454 adapter->hw.subsystem_device_id = --- 3343 unchanged lines hidden --- |