Deleted Added
full compact
if_lem.c (253303) if_lem.c (254263)
1/******************************************************************************
2
3 Copyright (c) 2001-2012, 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-2012, 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_lem.c 253303 2013-07-12 22:36:26Z jfv $*/
33/*$FreeBSD: head/sys/dev/e1000/if_lem.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

--- 2072 unchanged lines hidden (view full) ---

2114 *
2115 **********************************************************************/
2116static void
2117lem_identify_hardware(struct adapter *adapter)
2118{
2119 device_t dev = adapter->dev;
2120
2121 /* 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

--- 2072 unchanged lines hidden (view full) ---

2114 *
2115 **********************************************************************/
2116static void
2117lem_identify_hardware(struct adapter *adapter)
2118{
2119 device_t dev = adapter->dev;
2120
2121 /* Make sure our PCI config space has the necessary stuff set */
2122 pci_enable_busmaster(dev);
2122 adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2);
2123 adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2);
2123 if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) &&
2124 (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) {
2125 device_printf(dev, "Memory Access and/or Bus Master bits "
2126 "were not set!\n");
2127 adapter->hw.bus.pci_cmd_word |=
2128 (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN);
2129 pci_write_config(dev, PCIR_COMMAND,
2130 adapter->hw.bus.pci_cmd_word, 2);
2131 }
2132
2133 /* Save off the information about this board */
2134 adapter->hw.vendor_id = pci_get_vendor(dev);
2135 adapter->hw.device_id = pci_get_device(dev);
2136 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1);
2137 adapter->hw.subsystem_vendor_id =
2138 pci_read_config(dev, PCIR_SUBVEND_0, 2);
2139 adapter->hw.subsystem_device_id =

--- 2529 unchanged lines hidden ---
2124
2125 /* Save off the information about this board */
2126 adapter->hw.vendor_id = pci_get_vendor(dev);
2127 adapter->hw.device_id = pci_get_device(dev);
2128 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1);
2129 adapter->hw.subsystem_vendor_id =
2130 pci_read_config(dev, PCIR_SUBVEND_0, 2);
2131 adapter->hw.subsystem_device_id =

--- 2529 unchanged lines hidden ---