Deleted Added
full compact
if_rl.c (43515) if_rl.c (44238)
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 * $Id: if_rl.c,v 1.10 1999/01/22 15:25:04 wpaul Exp $
32 * $Id: if_rl.c,v 1.22 1999/02/23 06:42:42 wpaul Exp $
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.

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

122 * uniprocessor systems though.
123 */
124#define RL_USEIOSPACE
125
126#include <pci/if_rlreg.h>
127
128#ifndef lint
129static 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.

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

122 * uniprocessor systems though.
123 */
124#define RL_USEIOSPACE
125
126#include <pci/if_rlreg.h>
127
128#ifndef lint
129static const char rcsid[] =
130 "$Id: if_rl.c,v 1.10 1999/01/22 15:25:04 wpaul Exp $";
130 "$Id: if_rl.c,v 1.22 1999/02/23 06:42:42 wpaul Exp $";
131#endif
132
133/*
134 * Various supported device vendors/types and their names.
135 */
136static struct rl_type rl_devs[] = {
137 { RT_VENDORID, RT_DEVICEID_8129,
138 "RealTek 8129 10/100BaseTX" },
139 { RT_VENDORID, RT_DEVICEID_8139,
140 "RealTek 8139 10/100BaseTX" },
141 { ACCTON_VENDORID, ACCTON_DEVICEID_5030,
142 "Accton MPX 5030/5038 10/100BaseTX" },
131#endif
132
133/*
134 * Various supported device vendors/types and their names.
135 */
136static struct rl_type rl_devs[] = {
137 { RT_VENDORID, RT_DEVICEID_8129,
138 "RealTek 8129 10/100BaseTX" },
139 { RT_VENDORID, RT_DEVICEID_8139,
140 "RealTek 8139 10/100BaseTX" },
141 { ACCTON_VENDORID, ACCTON_DEVICEID_5030,
142 "Accton MPX 5030/5038 10/100BaseTX" },
143 { DELTA_VENDORID, DELTA_DEVICEID_8139,
144 "Delta Electronics 8139 10/100BaseTX" },
145 { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139,
146 "Addtron Technolgy 8139 10/100BaseTX" },
143 { 0, 0, NULL }
144};
145
146/*
147 * Various supported PHY vendors/types and their names. Note that
148 * this driver will work with pretty much any MII-compliant PHY,
149 * so failure to positively identify the chip is not a fatal error.
150 */

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

1114 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
1115
1116 /*
1117 * Now read the exact device type from the EEPROM to find
1118 * out if it's an 8129 or 8139.
1119 */
1120 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
1121
147 { 0, 0, NULL }
148};
149
150/*
151 * Various supported PHY vendors/types and their names. Note that
152 * this driver will work with pretty much any MII-compliant PHY,
153 * so failure to positively identify the chip is not a fatal error.
154 */

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

1118 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
1119
1120 /*
1121 * Now read the exact device type from the EEPROM to find
1122 * out if it's an 8129 or 8139.
1123 */
1124 rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
1125
1122 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030)
1126 if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
1127 rl_did == DELTA_DEVICEID_8139)
1123 sc->rl_type = RL_8139;
1124 else if (rl_did == RT_DEVICEID_8129)
1125 sc->rl_type = RL_8129;
1126 else {
1127 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
1128 free(sc, M_DEVBUF);
1129 goto fail;
1130 }

--- 863 unchanged lines hidden ---
1128 sc->rl_type = RL_8139;
1129 else if (rl_did == RT_DEVICEID_8129)
1130 sc->rl_type = RL_8129;
1131 else {
1132 printf("rl%d: unknown device ID: %x\n", unit, rl_did);
1133 free(sc, M_DEVBUF);
1134 goto fail;
1135 }

--- 863 unchanged lines hidden ---