Deleted Added
full compact
if_ste.c (72813) if_ste.c (79472)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
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
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
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
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/pci/if_ste.c 72813 2001-02-21 20:54:22Z wpaul $
32 * $FreeBSD: head/sys/pci/if_ste.c 79472 2001-07-09 17:58:42Z wpaul $
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/sockio.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>

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

69#define STE_USEIOSPACE
70
71#include <pci/if_stereg.h>
72
73MODULE_DEPEND(ste, miibus, 1, 1, 1);
74
75#if !defined(lint)
76static const char rcsid[] =
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/sockio.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>

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

69#define STE_USEIOSPACE
70
71#include <pci/if_stereg.h>
72
73MODULE_DEPEND(ste, miibus, 1, 1, 1);
74
75#if !defined(lint)
76static const char rcsid[] =
77 "$FreeBSD: head/sys/pci/if_ste.c 72813 2001-02-21 20:54:22Z wpaul $";
77 "$FreeBSD: head/sys/pci/if_ste.c 79472 2001-07-09 17:58:42Z wpaul $";
78#endif
79
80/*
81 * Various supported device vendors/types and their names.
82 */
83static struct ste_type ste_devs[] = {
84 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" },
85 { DL_VENDORID, DL_DEVICEID_550TX, "D-Link DFE-550TX 10/100BaseTX" },

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

940 pci_write_config(dev, STE_PCI_LOMEM, membase, 4);
941 pci_write_config(dev, STE_PCI_INTLINE, irq, 4);
942 }
943
944 /*
945 * Map control/status registers.
946 */
947 pci_enable_busmaster(dev);
78#endif
79
80/*
81 * Various supported device vendors/types and their names.
82 */
83static struct ste_type ste_devs[] = {
84 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" },
85 { DL_VENDORID, DL_DEVICEID_550TX, "D-Link DFE-550TX 10/100BaseTX" },

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

940 pci_write_config(dev, STE_PCI_LOMEM, membase, 4);
941 pci_write_config(dev, STE_PCI_INTLINE, irq, 4);
942 }
943
944 /*
945 * Map control/status registers.
946 */
947 pci_enable_busmaster(dev);
948 pci_enable_io(dev, PCIM_CMD_PORTEN);
949 pci_enable_io(dev, PCIM_CMD_MEMEN);
948 pci_enable_io(dev, SYS_RES_IOPORT);
949 pci_enable_io(dev, SYS_RES_MEMORY);
950 command = pci_read_config(dev, PCIR_COMMAND, 4);
951
952#ifdef STE_USEIOSPACE
953 if (!(command & PCIM_CMD_PORTEN)) {
954 printf("ste%d: failed to enable I/O ports!\n", unit);
955 error = ENXIO;
956 goto fail;
957 }

--- 631 unchanged lines hidden ---
950 command = pci_read_config(dev, PCIR_COMMAND, 4);
951
952#ifdef STE_USEIOSPACE
953 if (!(command & PCIM_CMD_PORTEN)) {
954 printf("ste%d: failed to enable I/O ports!\n", unit);
955 error = ENXIO;
956 goto fail;
957 }

--- 631 unchanged lines hidden ---