Deleted Added
full compact
if_fxp.c (251600) if_fxp.c (254263)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
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
8 * are met:

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

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
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
8 * are met:

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

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 251600 2013-06-10 07:31:49Z yongari $");
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 254263 2013-08-12 23:30:01Z scottl $");
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#ifdef HAVE_KERNEL_OPTION_HEADERS
38#include "opt_device_polling.h"
39#endif

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

447 error = ENOSPC;
448 goto fail;
449 }
450
451 /*
452 * Enable bus mastering.
453 */
454 pci_enable_busmaster(dev);
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#ifdef HAVE_KERNEL_OPTION_HEADERS
38#include "opt_device_polling.h"
39#endif

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

447 error = ENOSPC;
448 goto fail;
449 }
450
451 /*
452 * Enable bus mastering.
453 */
454 pci_enable_busmaster(dev);
455 val = pci_read_config(dev, PCIR_COMMAND, 2);
456
457 /*
458 * Figure out which we should try first - memory mapping or i/o mapping?
459 * We default to memory mapping. Then we accept an override from the
460 * command line. Then we check to see which one is enabled.
461 */
462 prefer_iomap = 0;
463 resource_int_value(device_get_name(dev), device_get_unit(dev),

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

605 * If we are not a 82557 chip, we can enable extended features.
606 */
607 if (sc->revision != FXP_REV_82557) {
608 /*
609 * If MWI is enabled in the PCI configuration, and there
610 * is a valid cacheline size (8 or 16 dwords), then tell
611 * the board to turn on MWI.
612 */
455
456 /*
457 * Figure out which we should try first - memory mapping or i/o mapping?
458 * We default to memory mapping. Then we accept an override from the
459 * command line. Then we check to see which one is enabled.
460 */
461 prefer_iomap = 0;
462 resource_int_value(device_get_name(dev), device_get_unit(dev),

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

604 * If we are not a 82557 chip, we can enable extended features.
605 */
606 if (sc->revision != FXP_REV_82557) {
607 /*
608 * If MWI is enabled in the PCI configuration, and there
609 * is a valid cacheline size (8 or 16 dwords), then tell
610 * the board to turn on MWI.
611 */
612 val = pci_read_config(dev, PCIR_COMMAND, 2);
613 if (val & PCIM_CMD_MWRICEN &&
614 pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0)
615 sc->flags |= FXP_FLAG_MWI_ENABLE;
616
617 /* turn on the extended TxCB feature */
618 sc->flags |= FXP_FLAG_EXT_TXCB;
619
620 /* enable reception of long frames for VLAN */

--- 2645 unchanged lines hidden ---
613 if (val & PCIM_CMD_MWRICEN &&
614 pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0)
615 sc->flags |= FXP_FLAG_MWI_ENABLE;
616
617 /* turn on the extended TxCB feature */
618 sc->flags |= FXP_FLAG_EXT_TXCB;
619
620 /* enable reception of long frames for VLAN */

--- 2645 unchanged lines hidden ---