if_rl.c (67164) | if_rl.c (67771) |
---|---|
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 67164 2000-10-15 14:19:01Z phk $ | 32 * $FreeBSD: head/sys/pci/if_rl.c 67771 2000-10-28 09:00:20Z 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 67164 2000-10-15 14:19:01Z phk $"; | 136 "$FreeBSD: head/sys/pci/if_rl.c 67771 2000-10-28 09:00:20Z 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" }, 145 { RT_VENDORID, RT_DEVICEID_8139, 146 "RealTek 8139 10/100BaseTX" }, | 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" }, 145 { RT_VENDORID, RT_DEVICEID_8139, 146 "RealTek 8139 10/100BaseTX" }, |
147 { RT_VENDORID, RT_DEVICEID_8138, 148 "RealTek 8139 10/100BaseTX CardBus" }, |
|
147 { ACCTON_VENDORID, ACCTON_DEVICEID_5030, 148 "Accton MPX 5030/5038 10/100BaseTX" }, 149 { DELTA_VENDORID, DELTA_DEVICEID_8139, 150 "Delta Electronics 8139 10/100BaseTX" }, 151 { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139, 152 "Addtron Technolgy 8139 10/100BaseTX" }, 153 { 0, 0, NULL } 154}; --- 752 unchanged lines hidden (view full) --- 907 908 /* 909 * Now read the exact device type from the EEPROM to find 910 * out if it's an 8129 or 8139. 911 */ 912 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0); 913 914 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 || | 149 { ACCTON_VENDORID, ACCTON_DEVICEID_5030, 150 "Accton MPX 5030/5038 10/100BaseTX" }, 151 { DELTA_VENDORID, DELTA_DEVICEID_8139, 152 "Delta Electronics 8139 10/100BaseTX" }, 153 { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139, 154 "Addtron Technolgy 8139 10/100BaseTX" }, 155 { 0, 0, NULL } 156}; --- 752 unchanged lines hidden (view full) --- 909 910 /* 911 * Now read the exact device type from the EEPROM to find 912 * out if it's an 8129 or 8139. 913 */ 914 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0); 915 916 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 || |
915 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139) | 917 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 || 918 rl_did == RT_DEVICEID_8138) |
916 sc->rl_type = RL_8139; 917 else if (rl_did == RT_DEVICEID_8129) 918 sc->rl_type = RL_8129; 919 else { 920 printf("rl%d: unknown device ID: %x\n", unit, rl_did); 921 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); 922 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); 923 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); --- 748 unchanged lines hidden --- | 919 sc->rl_type = RL_8139; 920 else if (rl_did == RT_DEVICEID_8129) 921 sc->rl_type = RL_8129; 922 else { 923 printf("rl%d: unknown device ID: %x\n", unit, rl_did); 924 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); 925 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); 926 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); --- 748 unchanged lines hidden --- |