Deleted Added
full compact
if_rl.c (78508) if_rl.c (79472)
1/*
2 * Copyright (c) 1997, 1998
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
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_rl.c 78508 2001-06-20 19:48:35Z bmilekic $
32 * $FreeBSD: head/sys/pci/if_rl.c 79472 2001-07-09 17:58:42Z wpaul $
33 */
34
35/*
36 * RealTek 8129/8139 PCI NIC driver
37 *
38 * Supports several extremely cheap PCI 10/100 adapters based on
39 * the RealTek chipset. Datasheets can be obtained from
40 * www.realtek.com.tw.

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

128 * uniprocessor systems though.
129 */
130#define RL_USEIOSPACE
131
132#include <pci/if_rlreg.h>
133
134#ifndef lint
135static const char rcsid[] =
33 */
34
35/*
36 * RealTek 8129/8139 PCI NIC driver
37 *
38 * Supports several extremely cheap PCI 10/100 adapters based on
39 * the RealTek chipset. Datasheets can be obtained from
40 * www.realtek.com.tw.

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

128 * uniprocessor systems though.
129 */
130#define RL_USEIOSPACE
131
132#include <pci/if_rlreg.h>
133
134#ifndef lint
135static const char rcsid[] =
136 "$FreeBSD: head/sys/pci/if_rl.c 78508 2001-06-20 19:48:35Z bmilekic $";
136 "$FreeBSD: head/sys/pci/if_rl.c 79472 2001-07-09 17:58:42Z wpaul $";
137#endif
138
139/*
140 * Various supported device vendors/types and their names.
141 */
142static struct rl_type rl_devs[] = {
143 { RT_VENDORID, RT_DEVICEID_8129,
144 "RealTek 8129 10/100BaseTX" },

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

830 pci_write_config(dev, RL_PCI_LOMEM, membase, 4);
831 pci_write_config(dev, RL_PCI_INTLINE, irq, 4);
832 }
833
834 /*
835 * Map control/status registers.
836 */
837 pci_enable_busmaster(dev);
137#endif
138
139/*
140 * Various supported device vendors/types and their names.
141 */
142static struct rl_type rl_devs[] = {
143 { RT_VENDORID, RT_DEVICEID_8129,
144 "RealTek 8129 10/100BaseTX" },

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

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

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

--- 826 unchanged lines hidden ---