Deleted Added
full compact
if_rl.c (109095) if_rl.c (109108)
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 109095 2003-01-11 07:10:35Z sanpei $
32 * $FreeBSD: head/sys/pci/if_rl.c 109108 2003-01-11 16:08:59Z des $
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.

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

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

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

127 * uniprocessor systems though.
128 */
129#define RL_USEIOSPACE
130
131#include <pci/if_rlreg.h>
132
133#ifndef lint
134static const char rcsid[] =
135 "$FreeBSD: head/sys/pci/if_rl.c 109095 2003-01-11 07:10:35Z sanpei $";
135 "$FreeBSD: head/sys/pci/if_rl.c 109108 2003-01-11 16:08:59Z des $";
136#endif
137
138/*
139 * Various supported device vendors/types and their names.
140 */
141static struct rl_type rl_devs[] = {
142 { RT_VENDORID, RT_DEVICEID_8129,
143 "RealTek 8129 10/100BaseTX" },

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

983 * Now read the exact device type from the EEPROM to find
984 * out if it's an 8129 or 8139.
985 */
986 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
987
988 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
989 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 ||
990 rl_did == RT_DEVICEID_8138 || rl_did == DLINK_DEVICEID_530TXPLUS ||
136#endif
137
138/*
139 * Various supported device vendors/types and their names.
140 */
141static struct rl_type rl_devs[] = {
142 { RT_VENDORID, RT_DEVICEID_8129,
143 "RealTek 8129 10/100BaseTX" },

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

983 * Now read the exact device type from the EEPROM to find
984 * out if it's an 8129 or 8139.
985 */
986 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
987
988 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
989 rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 ||
990 rl_did == RT_DEVICEID_8138 || rl_did == DLINK_DEVICEID_530TXPLUS ||
991 rl_did == DLINK_DEVICEID_690TXD || rl_did == COREGA_DEVICEID_CBTXD ||
992 rl_did == COREGA_DEVICEID_CBTXD)
991 rl_did == DLINK_DEVICEID_690TXD ||
992 rl_did == COREGA_DEVICEID_FETHERCBTXD ||
993 rl_did == COREGA_DEVICEID_FETHERIICBTXD)
993 sc->rl_type = RL_8139;
994 else if (rl_did == RT_DEVICEID_8129)
995 sc->rl_type = RL_8129;
996 else {
997 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
998 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
999 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);
1000 error = ENXIO;

--- 937 unchanged lines hidden ---
994 sc->rl_type = RL_8139;
995 else if (rl_did == RT_DEVICEID_8129)
996 sc->rl_type = RL_8129;
997 else {
998 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
999 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
1000 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);
1001 error = ENXIO;

--- 937 unchanged lines hidden ---