if_ixgb.c (253102) | if_ixgb.c (254263) |
---|---|
1/******************************************************************************* 2 3Copyright (c) 2001-2004, Intel Corporation 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 --- 17 unchanged lines hidden (view full) --- 26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30POSSIBILITY OF SUCH DAMAGE. 31 32***************************************************************************/ 33 | 1/******************************************************************************* 2 3Copyright (c) 2001-2004, Intel Corporation 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 --- 17 unchanged lines hidden (view full) --- 26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30POSSIBILITY OF SUCH DAMAGE. 31 32***************************************************************************/ 33 |
34/*$FreeBSD: head/sys/dev/ixgb/if_ixgb.c 253102 2013-07-09 18:15:59Z jkim $*/ | 34/*$FreeBSD: head/sys/dev/ixgb/if_ixgb.c 254263 2013-08-12 23:30:01Z scottl $*/ |
35 36#ifdef HAVE_KERNEL_OPTION_HEADERS 37#include "opt_device_polling.h" 38#endif 39 40#include <dev/ixgb/if_ixgb.h> 41 42/********************************************************************* --- 1162 unchanged lines hidden (view full) --- 1205 * 1206 **********************************************************************/ 1207static void 1208ixgb_identify_hardware(struct adapter * adapter) 1209{ 1210 device_t dev = adapter->dev; 1211 1212 /* Make sure our PCI config space has the necessary stuff set */ | 35 36#ifdef HAVE_KERNEL_OPTION_HEADERS 37#include "opt_device_polling.h" 38#endif 39 40#include <dev/ixgb/if_ixgb.h> 41 42/********************************************************************* --- 1162 unchanged lines hidden (view full) --- 1205 * 1206 **********************************************************************/ 1207static void 1208ixgb_identify_hardware(struct adapter * adapter) 1209{ 1210 device_t dev = adapter->dev; 1211 1212 /* Make sure our PCI config space has the necessary stuff set */ |
1213 pci_enable_busmaster(dev); |
|
1213 adapter->hw.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); | 1214 adapter->hw.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); |
1214 if (!((adapter->hw.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && 1215 (adapter->hw.pci_cmd_word & PCIM_CMD_MEMEN))) { 1216 device_printf(dev, 1217 "Memory Access and/or Bus Master bits were not set!\n"); 1218 adapter->hw.pci_cmd_word |= 1219 (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); 1220 pci_write_config(dev, PCIR_COMMAND, adapter->hw.pci_cmd_word, 2); 1221 } | 1215 |
1222 /* Save off the information about this board */ 1223 adapter->hw.vendor_id = pci_get_vendor(dev); 1224 adapter->hw.device_id = pci_get_device(dev); 1225 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); 1226 adapter->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); 1227 adapter->hw.subsystem_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); 1228 1229 /* Set MacType, etc. based on this PCI info */ --- 1305 unchanged lines hidden --- | 1216 /* Save off the information about this board */ 1217 adapter->hw.vendor_id = pci_get_vendor(dev); 1218 adapter->hw.device_id = pci_get_device(dev); 1219 adapter->hw.revision_id = pci_read_config(dev, PCIR_REVID, 1); 1220 adapter->hw.subsystem_vendor_id = pci_read_config(dev, PCIR_SUBVEND_0, 2); 1221 adapter->hw.subsystem_id = pci_read_config(dev, PCIR_SUBDEV_0, 2); 1222 1223 /* Set MacType, etc. based on this PCI info */ --- 1305 unchanged lines hidden --- |