2 * ===================================
3 * HARP | Host ATM Research Platform
4 * ===================================
6 * This Host ATM Research Platform ("HARP") file (the "Software") is
7 * made available by Network Computing Services, Inc. ("NetworkCS")
8 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
12 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
14 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
15 * In no event shall NetworkCS be responsible for any damages, including
16 * but not limited to consequential damages, arising from or relating to
17 * any use of the Software or related support.
19 * Copyright 1994-1998 Network Computing Services, Inc.
21 * Copies of this Software may be made, however, the above copyright
22 * notice must be reproduced on all copies.
25 #include <sys/cdefs.h>
26 __FBSDID("$FreeBSD$");
29 * FORE Systems 200-Series Adapter Support
30 * ---------------------------------------
36 #include <sys/param.h>
37 #include <sys/systm.h>
38 #include <sys/socket.h>
39 #include <sys/socketvar.h>
41 #include <netatm/port.h>
42 #include <netatm/queue.h>
43 #include <netatm/atm.h>
44 #include <netatm/atm_sys.h>
45 #include <netatm/atm_sap.h>
46 #include <netatm/atm_cm.h>
47 #include <netatm/atm_if.h>
48 #include <netatm/atm_stack.h>
49 #include <netatm/atm_pcb.h>
50 #include <netatm/atm_var.h>
51 #include <dev/pci/pcivar.h>
52 #include <dev/hfa/fore.h>
53 #include <dev/hfa/fore_aali.h>
54 #include <dev/hfa/fore_slave.h>
55 #include <dev/hfa/fore_stats.h>
56 #include <dev/hfa/fore_var.h>
57 #include <dev/hfa/fore_include.h>
60 __RCSID("@(#) $FreeBSD$");
65 * Process a Fore timer tick
67 * This function is called every FORE_TIME_TICK seconds in order to update
68 * all of the unit watchdog timers.
73 * tip pointer to fore timer control block
88 * Schedule next timeout
90 atm_timeout(&fore_timer, ATM_HZ * FORE_TIME_TICK, fore_timeout);
93 * Run through all units, updating each active timer.
94 * If an expired timer is found, notify that unit.
96 for (i = 0; i < fore_nunits; i++) {
98 if ((fup = fore_units[i]) == NULL)
102 * Decrement timer, if it's active
104 if (fup->fu_timer && (--fup->fu_timer == 0)) {
107 * Timeout occurred - go check out the queues
109 ATM_DEBUG0("fore_timeout\n");
110 DEVICE_LOCK((Cmn_unit *)fup);
112 DEVICE_UNLOCK((Cmn_unit *)fup);