Deleted Added
full compact
if_nge.c (79424) if_nge.c (79472)
1/*
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <wpaul@bsdi.com>. 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:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <wpaul@bsdi.com>. 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:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/nge/if_nge.c 79424 2001-07-08 16:24:01Z wpaul $
33 * $FreeBSD: head/sys/dev/nge/if_nge.c 79472 2001-07-09 17:58:42Z wpaul $
34 */
35
36/*
37 * National Semiconductor DP83820/DP83821 gigabit ethernet driver
38 * for FreeBSD. Datasheets are available from:
39 *
40 * http://www.national.com/ds/DP/DP83820.pdf
41 * http://www.national.com/ds/DP/DP83821.pdf

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

132
133MODULE_DEPEND(nge, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
34 */
35
36/*
37 * National Semiconductor DP83820/DP83821 gigabit ethernet driver
38 * for FreeBSD. Datasheets are available from:
39 *
40 * http://www.national.com/ds/DP/DP83820.pdf
41 * http://www.national.com/ds/DP/DP83821.pdf

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

132
133MODULE_DEPEND(nge, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
140 "$FreeBSD: head/sys/dev/nge/if_nge.c 79424 2001-07-08 16:24:01Z wpaul $";
140 "$FreeBSD: head/sys/dev/nge/if_nge.c 79472 2001-07-09 17:58:42Z wpaul $";
141#endif
142
143#define NGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
144
145/*
146 * Various supported device vendors/types and their names.
147 */
148static struct nge_type nge_devs[] = {

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

828 pci_write_config(dev, NGE_PCI_LOMEM, membase, 4);
829 pci_write_config(dev, NGE_PCI_INTLINE, irq, 4);
830 }
831
832 /*
833 * Map control/status registers.
834 */
835 pci_enable_busmaster(dev);
141#endif
142
143#define NGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
144
145/*
146 * Various supported device vendors/types and their names.
147 */
148static struct nge_type nge_devs[] = {

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

828 pci_write_config(dev, NGE_PCI_LOMEM, membase, 4);
829 pci_write_config(dev, NGE_PCI_INTLINE, irq, 4);
830 }
831
832 /*
833 * Map control/status registers.
834 */
835 pci_enable_busmaster(dev);
836 pci_enable_io(dev, PCIM_CMD_PORTEN);
837 pci_enable_io(dev, PCIM_CMD_MEMEN);
836 pci_enable_io(dev, SYS_RES_IOPORT);
837 pci_enable_io(dev, SYS_RES_MEMORY);
838 command = pci_read_config(dev, PCIR_COMMAND, 4);
839
840#ifdef NGE_USEIOSPACE
841 if (!(command & PCIM_CMD_PORTEN)) {
842 printf("nge%d: failed to enable I/O ports!\n", unit);
843 error = ENXIO;;
844 goto fail;
845 }

--- 1194 unchanged lines hidden ---
838 command = pci_read_config(dev, PCIR_COMMAND, 4);
839
840#ifdef NGE_USEIOSPACE
841 if (!(command & PCIM_CMD_PORTEN)) {
842 printf("nge%d: failed to enable I/O ports!\n", unit);
843 error = ENXIO;;
844 goto fail;
845 }

--- 1194 unchanged lines hidden ---