Deleted Added
full compact
if_rl.c (99165) if_rl.c (100957)
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 99165 2002-06-30 22:16:22Z luigi $
32 * $FreeBSD: head/sys/pci/if_rl.c 100957 2002-07-30 17:31:42Z 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 99165 2002-06-30 22:16:22Z luigi $";
134 "$FreeBSD: head/sys/pci/if_rl.c 100957 2002-07-30 17:31:42Z 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" },

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

1375 rl_txeof(sc);
1376 if (ifp->if_snd.ifq_head != NULL)
1377 rl_start(ifp);
1378
1379 if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */
1380 u_int16_t status;
1381
1382 status = CSR_READ_2(sc, RL_ISR);
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" },

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

1375 rl_txeof(sc);
1376 if (ifp->if_snd.ifq_head != NULL)
1377 rl_start(ifp);
1378
1379 if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */
1380 u_int16_t status;
1381
1382 status = CSR_READ_2(sc, RL_ISR);
1383 if (status == 0xffff)
1384 goto done;
1383 if (status)
1384 CSR_WRITE_2(sc, RL_ISR, status);
1385
1386 /*
1387 * XXX check behaviour on receiver stalls.
1388 */
1389
1390 if (status & RL_ISR_SYSTEM_ERR) {

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

1421 rl_poll(ifp, 0, 1);
1422 goto done;
1423 }
1424#endif /* DEVICE_POLLING */
1425
1426 for (;;) {
1427
1428 status = CSR_READ_2(sc, RL_ISR);
1385 if (status)
1386 CSR_WRITE_2(sc, RL_ISR, status);
1387
1388 /*
1389 * XXX check behaviour on receiver stalls.
1390 */
1391
1392 if (status & RL_ISR_SYSTEM_ERR) {

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

1423 rl_poll(ifp, 0, 1);
1424 goto done;
1425 }
1426#endif /* DEVICE_POLLING */
1427
1428 for (;;) {
1429
1430 status = CSR_READ_2(sc, RL_ISR);
1431 /* If the card has gone away the read returns 0xffff. */
1432 if (status == 0xffff)
1433 break;
1429 if (status)
1430 CSR_WRITE_2(sc, RL_ISR, status);
1431
1432 if ((status & RL_INTRS) == 0)
1433 break;
1434
1435 if (status & RL_ISR_RX_OK)
1436 rl_rxeof(sc);

--- 468 unchanged lines hidden ---
1434 if (status)
1435 CSR_WRITE_2(sc, RL_ISR, status);
1436
1437 if ((status & RL_INTRS) == 0)
1438 break;
1439
1440 if (status & RL_ISR_RX_OK)
1441 rl_rxeof(sc);

--- 468 unchanged lines hidden ---