if_rl.c (60536) | if_rl.c (61041) |
---|---|
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 60536 2000-05-14 02:18:43Z archie $ | 32 * $FreeBSD: head/sys/pci/if_rl.c 61041 2000-05-28 16:13:43Z peter $ |
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. --- 88 unchanged lines hidden (view full) --- 129 * uniprocessor systems though. 130 */ 131#define RL_USEIOSPACE 132 133#include <pci/if_rlreg.h> 134 135#ifndef lint 136static 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. --- 88 unchanged lines hidden (view full) --- 129 * uniprocessor systems though. 130 */ 131#define RL_USEIOSPACE 132 133#include <pci/if_rlreg.h> 134 135#ifndef lint 136static const char rcsid[] = |
137 "$FreeBSD: head/sys/pci/if_rl.c 60536 2000-05-14 02:18:43Z archie $"; | 137 "$FreeBSD: head/sys/pci/if_rl.c 61041 2000-05-28 16:13:43Z peter $"; |
138#endif 139 140/* 141 * Various supported device vendors/types and their names. 142 */ 143static struct rl_type rl_devs[] = { 144 { RT_VENDORID, RT_DEVICEID_8129, 145 "RealTek 8129 10/100BaseTX" }, --- 671 unchanged lines hidden (view full) --- 817 pci_write_config(dev, RL_PCI_LOMEM, membase, 4); 818 pci_write_config(dev, RL_PCI_INTLINE, irq, 4); 819 } 820 } 821 822 /* 823 * Map control/status registers. 824 */ | 138#endif 139 140/* 141 * Various supported device vendors/types and their names. 142 */ 143static struct rl_type rl_devs[] = { 144 { RT_VENDORID, RT_DEVICEID_8129, 145 "RealTek 8129 10/100BaseTX" }, --- 671 unchanged lines hidden (view full) --- 817 pci_write_config(dev, RL_PCI_LOMEM, membase, 4); 818 pci_write_config(dev, RL_PCI_INTLINE, irq, 4); 819 } 820 } 821 822 /* 823 * Map control/status registers. 824 */ |
825 command = pci_read_config(dev, PCI_COMMAND_STATUS_REG, 4); | 825 command = pci_read_config(dev, PCIR_COMMAND, 4); |
826 command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); | 826 command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); |
827 pci_write_config(dev, PCI_COMMAND_STATUS_REG, command, 4); 828 command = pci_read_config(dev, PCI_COMMAND_STATUS_REG, 4); | 827 pci_write_config(dev, PCIR_COMMAND, command, 4); 828 command = pci_read_config(dev, PCIR_COMMAND, 4); |
829 830#ifdef RL_USEIOSPACE 831 if (!(command & PCIM_CMD_PORTEN)) { 832 printf("rl%d: failed to enable I/O ports!\n", unit); 833 error = ENXIO; 834 goto fail; 835 } 836#else --- 822 unchanged lines hidden --- | 829 830#ifdef RL_USEIOSPACE 831 if (!(command & PCIM_CMD_PORTEN)) { 832 printf("rl%d: failed to enable I/O ports!\n", unit); 833 error = ENXIO; 834 goto fail; 835 } 836#else --- 822 unchanged lines hidden --- |