Deleted Added
full compact
if_rl.c (94883) if_rl.c (96112)
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 94883 2002-04-16 22:03:14Z luigi $
32 * $FreeBSD: head/sys/pci/if_rl.c 96112 2002-05-06 13:43:00Z jhb $
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.

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

126 * uniprocessor systems though.
127 */
128#define RL_USEIOSPACE
129
130#include <pci/if_rlreg.h>
131
132#ifndef lint
133static 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.

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

126 * uniprocessor systems though.
127 */
128#define RL_USEIOSPACE
129
130#include <pci/if_rlreg.h>
131
132#ifndef lint
133static const char rcsid[] =
134 "$FreeBSD: head/sys/pci/if_rl.c 94883 2002-04-16 22:03:14Z luigi $";
134 "$FreeBSD: head/sys/pci/if_rl.c 96112 2002-05-06 13:43:00Z jhb $";
135#endif
136
137/*
138 * Various supported device vendors/types and their names.
139 */
140static struct rl_type rl_devs[] = {
141 { RT_VENDORID, RT_DEVICEID_8129,
142 "RealTek 8129 10/100BaseTX" },

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

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 { DLINK_VENDORID, DLINK_DEVICEID_530TXPLUS,
154 "D-Link DFE-530TX+ 10/100BaseTX" },
135#endif
136
137/*
138 * Various supported device vendors/types and their names.
139 */
140static struct rl_type rl_devs[] = {
141 { RT_VENDORID, RT_DEVICEID_8129,
142 "RealTek 8129 10/100BaseTX" },

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

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 { DLINK_VENDORID, DLINK_DEVICEID_530TXPLUS,
154 "D-Link DFE-530TX+ 10/100BaseTX" },
155 { DLINK_VENDORID, DLINK_DEVICEID_690TXD,
156 "D-Link DFE-690TXD 10/100BaseTX" },
155 { NORTEL_VENDORID, ACCTON_DEVICEID_5030,
156 "Nortel Networks 10/100BaseTX" },
157 { 0, 0, NULL }
158};
159
160static int rl_probe (device_t);
161static int rl_attach (device_t);
162static int rl_detach (device_t);

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

968 /*
969 * Now read the exact device type from the EEPROM to find
970 * out if it's an 8129 or 8139.
971 */
972 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
973
974 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
975 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 ||
157 { NORTEL_VENDORID, ACCTON_DEVICEID_5030,
158 "Nortel Networks 10/100BaseTX" },
159 { 0, 0, NULL }
160};
161
162static int rl_probe (device_t);
163static int rl_attach (device_t);
164static int rl_detach (device_t);

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

970 /*
971 * Now read the exact device type from the EEPROM to find
972 * out if it's an 8129 or 8139.
973 */
974 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
975
976 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
977 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 ||
976 rl_did == RT_DEVICEID_8138 || rl_did == DLINK_DEVICEID_530TXPLUS)
978 rl_did == RT_DEVICEID_8138 || rl_did == DLINK_DEVICEID_530TXPLUS ||
979 rl_did == DLINK_DEVICEID_690TXD)
977 sc->rl_type = RL_8139;
978 else if (rl_did == RT_DEVICEID_8129)
979 sc->rl_type = RL_8129;
980 else {
981 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
982 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
983 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
984 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);

--- 917 unchanged lines hidden ---
980 sc->rl_type = RL_8139;
981 else if (rl_did == RT_DEVICEID_8129)
982 sc->rl_type = RL_8129;
983 else {
984 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
985 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
986 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
987 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);

--- 917 unchanged lines hidden ---