diff options
author | gibbs <gibbs@FreeBSD.org> | 1997-09-21 22:02:25 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1997-09-21 22:02:25 +0000 |
commit | a415512fd4b3c95c87808401c97e649c8ac7f41e (patch) | |
tree | 8463ee0d001498dfdefc34fc8911c491b2f0ecf0 /sys | |
parent | 52ace446d29ab170f74f1db02832f24b01e04f20 (diff) | |
download | FreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.zip FreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.tar.gz |
Update for new callout interface.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 7 | ||||
-rw-r--r-- | sys/dev/fxp/if_fxpvar.h | 3 | ||||
-rw-r--r-- | sys/net/if_pppvar.h | 3 | ||||
-rw-r--r-- | sys/net/if_sl.c | 30 | ||||
-rw-r--r-- | sys/net/if_slvar.h | 12 | ||||
-rw-r--r-- | sys/net/if_sppp.h | 3 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 24 | ||||
-rw-r--r-- | sys/net/ppp_tty.c | 6 | ||||
-rw-r--r-- | sys/netatalk/aarp.c | 13 | ||||
-rw-r--r-- | sys/netatalk/at_control.c | 2 | ||||
-rw-r--r-- | sys/netatalk/at_var.h | 17 | ||||
-rw-r--r-- | sys/netinet/ip_mroute.c | 10 | ||||
-rw-r--r-- | sys/pccard/pccard.c | 13 | ||||
-rw-r--r-- | sys/pccard/pcic.c | 8 | ||||
-rw-r--r-- | sys/pccard/slot.h | 2 | ||||
-rw-r--r-- | sys/pci/if_fxp.c | 7 | ||||
-rw-r--r-- | sys/pci/if_fxpvar.h | 3 | ||||
-rw-r--r-- | sys/pci/ncr.c | 9 | ||||
-rw-r--r-- | sys/pci/scsiiom.c | 2 | ||||
-rw-r--r-- | sys/pci/tek390.c | 5 |
20 files changed, 108 insertions, 71 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index a4d1fcc..09adcf7 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_fxp.c,v 1.39 1997/09/05 10:23:54 davidg Exp $ */ /* @@ -515,6 +515,7 @@ fxp_attach(config_id, unit) if (sc == NULL) return; bzero(sc, sizeof(struct fxp_softc)); + callout_handle_init(&sc->stat_ch); s = splimp(); @@ -1112,7 +1113,7 @@ fxp_stop(sc) /* * Cancel stats updater. */ - untimeout(fxp_stats_update, sc); + untimeout(fxp_stats_update, sc, sc->stat_ch); /* * Issue software reset @@ -1337,7 +1338,7 @@ fxp_init(xsc) /* * Start stats updater. */ - timeout(fxp_stats_update, sc, hz); + sc->stat_ch = timeout(fxp_stats_update, sc, hz); } void diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h index 9c7e310..81789d6 100644 --- a/sys/dev/fxp/if_fxpvar.h +++ b/sys/dev/fxp/if_fxpvar.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_fxpvar.h,v 1.1 1997/09/05 10:23:58 davidg Exp $ */ /* @@ -53,6 +53,7 @@ struct fxp_softc { struct mbuf *rfa_headm; /* first mbuf in receive frame area */ struct mbuf *rfa_tailm; /* last mbuf in receive frame area */ struct fxp_stats *fxp_stats; /* Pointer to interface stats */ + struct callout_handle stat_ch; /* Handle for canceling our stat timeout */ int tx_queued; /* # of active TxCB's */ int promisc_mode; /* promiscuous mode enabled */ int phy_primary_addr; /* address of primary PHY */ diff --git a/sys/net/if_pppvar.h b/sys/net/if_pppvar.h index 41f9050..67a9d7b 100644 --- a/sys/net/if_pppvar.h +++ b/sys/net/if_pppvar.h @@ -39,7 +39,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id$ + * $Id: if_pppvar.h,v 1.8 1997/08/19 14:10:45 peter Exp $ */ /* @@ -55,6 +55,7 @@ struct ppp_softc { struct ifnet sc_if; /* network-visible interface */ /*hi*/ u_int sc_flags; /* control/status bits; see if_ppp.h */ + struct callout_handle sc_ch; /* Used for scheduling timeouts */ void *sc_devp; /* pointer to device-dep structure */ void (*sc_start) __P((struct ppp_softc *)); /* start output proc */ void (*sc_ctlp) __P((struct ppp_softc *)); /* rcvd control pkt */ diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 7d2f176..08cea82 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.58 1997/08/02 14:32:39 bde Exp $ + * $Id: if_sl.c,v 1.59 1997/08/13 14:57:14 ache Exp $ */ /* @@ -332,11 +332,11 @@ slclose(tp,flag) if (sc != NULL) { if (sc->sc_outfill) { sc->sc_outfill = 0; - untimeout(sl_outfill, sc); + untimeout(sl_outfill, sc, sc->sc_ofhandle); } if (sc->sc_keepalive) { sc->sc_keepalive = 0; - untimeout(sl_keepalive, sc); + untimeout(sl_keepalive, sc, sc->sc_kahandle); } if_down(&sc->sc_if); sc->sc_flags &= SC_STATIC; @@ -408,10 +408,13 @@ sltioctl(tp, cmd, data, flag, p) sc->sc_keepalive = *(u_int *)data * hz; if (sc->sc_keepalive) { sc->sc_flags |= SC_KEEPALIVE; - timeout(sl_keepalive, sc, sc->sc_keepalive); + sc->sc_kahandle = timeout(sl_keepalive, sc, + sc->sc_keepalive); } else { - sc->sc_flags &= ~SC_KEEPALIVE; - untimeout(sl_keepalive, sc); + if ((sc->sc_flags & SC_KEEPALIVE) != 0) { + untimeout(sl_keepalive, sc, sc->sc_kahandle); + sc->sc_flags &= ~SC_KEEPALIVE; + } } break; @@ -423,10 +426,13 @@ sltioctl(tp, cmd, data, flag, p) sc->sc_outfill = *(u_int *)data * hz; if (sc->sc_outfill) { sc->sc_flags |= SC_OUTWAIT; - timeout(sl_outfill, sc, sc->sc_outfill); + sc->sc_ofhandle = timeout(sl_outfill, sc, + sc->sc_outfill); } else { - sc->sc_flags &= ~SC_OUTWAIT; - untimeout(sl_outfill, sc); + if ((sc->sc_flags & SC_OUTWAIT) != 0) { + untimeout(sl_outfill, sc, sc->sc_ofhandle); + sc->sc_flags &= ~SC_OUTWAIT; + } } break; @@ -1005,10 +1011,9 @@ sl_keepalive(chan) pgsignal (sc->sc_ttyp->t_pgrp, SIGURG, 1); else sc->sc_flags |= SC_KEEPALIVE; - timeout(sl_keepalive, sc, sc->sc_keepalive); + sc->sc_kahandle = timeout(sl_keepalive, sc, sc->sc_keepalive); } else { sc->sc_flags &= ~SC_KEEPALIVE; - untimeout(sl_keepalive, sc); } } @@ -1029,10 +1034,9 @@ sl_outfill(chan) splx (s); } else sc->sc_flags |= SC_OUTWAIT; - timeout(sl_outfill, sc, sc->sc_outfill); + sc->sc_ofhandle = timeout(sl_outfill, sc, sc->sc_outfill); } else { sc->sc_flags &= ~SC_OUTWAIT; - untimeout(sl_outfill, sc); } } diff --git a/sys/net/if_slvar.h b/sys/net/if_slvar.h index 1621c97..b19bd26 100644 --- a/sys/net/if_slvar.h +++ b/sys/net/if_slvar.h @@ -32,12 +32,14 @@ * * @(#)if_slvar.h 8.3 (Berkeley) 2/1/94 * - * $Id$ + * $Id: if_slvar.h,v 1.13 1997/02/22 09:41:06 peter Exp $ */ #ifndef _NET_IF_SLVAR_H_ #define _NET_IF_SLVAR_H_ +#include <sys/callout.h> + /* * Definitions for SLIP interface data structures * @@ -57,7 +59,13 @@ struct sl_softc { long sc_abortcount; /* number of abort escape chars */ long sc_starttime; /* time of first abort in window */ u_int sc_keepalive; /* time to decide link hang */ - u_int sc_outfill; /* time to send FRAME_END when output idle */ + u_int sc_outfill; /* time to send FRAME_END when output idle */ + /* + * Handles for scheduling outfill and + * keepalive timeouts. + */ + struct callout_handle sc_ofhandle; + struct callout_handle sc_kahandle; #ifdef INET /* XXX */ struct slcompress sc_comp; /* tcp compression data */ #endif diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h index 3bee402..e0e61bb 100644 --- a/sys/net/if_sppp.h +++ b/sys/net/if_sppp.h @@ -16,7 +16,7 @@ * * From: Version 1.7, Wed Jun 7 22:12:02 MSD 1995 * - * $Id: if_sppp.h,v 1.5 1997/05/19 22:03:08 joerg Exp $ + * $Id: if_sppp.h,v 1.6 1997/05/22 22:15:39 joerg Exp $ */ #ifndef _NET_IF_HDLC_H_ @@ -75,6 +75,7 @@ struct sppp { u_char confid[IDX_COUNT]; /* id of last configuration request */ int rst_counter[IDX_COUNT]; /* restart counter */ int fail_counter[IDX_COUNT]; /* negotiation failure counter */ + struct callout_handle ch[IDX_COUNT]; struct slcp lcp; /* LCP params */ struct sipcp ipcp; /* IPCP params */ /* diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 1133938..3e1b854 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -17,7 +17,7 @@ * * From: Version 1.9, Wed Oct 4 18:58:15 MSK 1995 * - * $Id: if_spppsubr.c,v 1.25 1997/08/12 05:22:54 kjc Exp $ + * $Id: if_spppsubr.c,v 1.26 1997/09/02 01:18:37 bde Exp $ */ #include <sys/param.h> @@ -265,6 +265,7 @@ static const char *sppp_phase_name(enum ppp_phase phase); static const char *sppp_proto_name(u_short proto); static void sppp_keepalive(void *dummy); +static struct callout_handle keepalive_ch; static void sppp_qflush(struct ifqueue *ifq); static void sppp_get_ip_addrs(struct sppp *sp, u_long *src, u_long *dst); @@ -627,7 +628,7 @@ sppp_attach(struct ifnet *ifp) /* Initialize keepalive handler. */ if (! spppq) - timeout (sppp_keepalive, 0, hz * 10); + keepalive_ch = timeout (sppp_keepalive, 0, hz * 10); /* Insert new entry into the keepalive list. */ sp->pp_next = spppq; @@ -664,10 +665,10 @@ sppp_detach(struct ifnet *ifp) /* Stop keepalive handler. */ if (! spppq) - untimeout (sppp_keepalive, 0); + untimeout (sppp_keepalive, 0, keepalive_ch); for (i = 0; i < IDX_COUNT; i++) - untimeout((cps[i])->TO, (void *)sp); + untimeout((cps[i])->TO, (void *)sp, sp->ch[i]); } /* @@ -1522,7 +1523,8 @@ sppp_to_event(const struct cp *cp, struct sppp *sp) case STATE_STOPPING: sppp_cp_send(sp, cp->proto, TERM_REQ, ++sp->pp_seq, 0, 0); - timeout(cp->TO, (void *)sp, sp->lcp.timeout); + sp->ch[cp->protoidx] = timeout(cp->TO, (void *)sp, + sp->lcp.timeout); break; case STATE_REQ_SENT: case STATE_ACK_RCVD: @@ -1532,7 +1534,8 @@ sppp_to_event(const struct cp *cp, struct sppp *sp) break; case STATE_ACK_SENT: (cp->scr)(sp); - timeout(cp->TO, (void *)sp, sp->lcp.timeout); + sp->ch[cp->protoidx] = timeout(cp->TO, (void *)sp, + sp->lcp.timeout); break; } @@ -1548,7 +1551,7 @@ sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate) { sp->state[cp->protoidx] = newstate; - untimeout(cp->TO, (void *)sp); + untimeout(cp->TO, (void *)sp, sp->ch[cp->protoidx]); switch (newstate) { case STATE_INITIAL: case STATE_STARTING: @@ -1561,7 +1564,8 @@ sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate) case STATE_REQ_SENT: case STATE_ACK_RCVD: case STATE_ACK_SENT: - timeout(cp->TO, (void *)sp, sp->lcp.timeout); + sp->ch[cp->protoidx] = timeout(cp->TO, (void *)sp, + sp->lcp.timeout); break; } } @@ -1581,6 +1585,7 @@ sppp_lcp_init(struct sppp *sp) sp->fail_counter[IDX_LCP] = 0; sp->lcp.protos = 0; sp->lcp.mru = sp->lcp.their_mru = PP_MTU; + callout_handle_init(&sp->ch[IDX_LCP]); /* * Initialize counters and timeout values. Note that we don't @@ -2111,6 +2116,7 @@ sppp_ipcp_init(struct sppp *sp) sp->ipcp.flags = 0; sp->state[IDX_IPCP] = STATE_INITIAL; sp->fail_counter[IDX_IPCP] = 0; + callout_handle_init(&sp->ch[IDX_IPCP]); } static void @@ -2577,7 +2583,7 @@ sppp_keepalive(void *dummy) } } splx(s); - timeout(sppp_keepalive, 0, hz * 10); + keepalive_ch = timeout(sppp_keepalive, 0, hz * 10); } /* diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index d830c60..88c66b5 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -70,7 +70,7 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: ppp_tty.c,v 1.22 1997/08/19 14:10:47 peter Exp $ */ +/* $Id: ppp_tty.c,v 1.23 1997/08/22 11:34:08 peter Exp $ */ #include "ppp.h" #if NPPP > 0 @@ -322,7 +322,7 @@ pppasyncrelinq(sc) sc->sc_m = NULL; } if (sc->sc_flags & SC_TIMEOUT) { - untimeout(ppp_timeout, (void *) sc); + untimeout(ppp_timeout, (void *) sc, sc->sc_ch); sc->sc_flags &= ~SC_TIMEOUT; } splx(s); @@ -758,7 +758,7 @@ pppasyncstart(sc) * drained the t_outq. */ if (!idle && (sc->sc_flags & SC_TIMEOUT) == 0) { - timeout(ppp_timeout, (void *) sc, 1); + sc->sc_ch = timeout(ppp_timeout, (void *) sc, 1); sc->sc_flags |= SC_TIMEOUT; } diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index cc54102..56c8924 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -64,13 +64,16 @@ u_char aarp_org_code[ 3 ] = { 0x00, 0x00, 0x00, }; +static struct callout_handle aarptimer_ch = + CALLOUT_HANDLE_INITIALIZER(&aarptimer_ch); + static void aarptimer(void *ignored) { struct aarptab *aat; int i, s; - timeout( aarptimer, (caddr_t)0, AARPT_AGE * hz ); + aarptimer_ch = timeout( aarptimer, (caddr_t)0, AARPT_AGE * hz ); aat = aarptab; for ( i = 0; i < AARPTAB_SIZE; i++, aat++ ) { if ( aat->aat_flags == 0 || ( aat->aat_flags & ATF_PERM )) @@ -362,7 +365,7 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m) * probed for the same address we'd like to use. Change the * address we're probing for. */ - untimeout( aarpprobe, ac ); + untimeout( aarpprobe, ac, aa->aa_ch ); wakeup( aa ); m_freem( m ); return; @@ -488,7 +491,7 @@ aarptnew( addr ) if ( first ) { first = 0; - timeout( aarptimer, (caddr_t)0, hz ); + aarptimer_ch = timeout( aarptimer, (caddr_t)0, hz ); } aat = &aarptab[ AARPTAB_HASH( *addr ) * AARPTAB_BSIZ ]; for ( n = 0; n < AARPTAB_BSIZ; n++, aat++ ) { @@ -547,7 +550,7 @@ aarpprobe( void *arg ) wakeup( aa ); return; } else { - timeout( aarpprobe, (caddr_t)ac, hz / 5 ); + aa->aa_ch = timeout( aarpprobe, (caddr_t)ac, hz / 5 ); } if (( m = m_gethdr( M_DONTWAIT, MT_DATA )) == NULL ) { @@ -612,7 +615,7 @@ aarp_clean(void) struct aarptab *aat; int i; - untimeout( aarptimer, 0 ); + untimeout( aarptimer, 0, aarptimer_ch ); for ( i = 0, aat = aarptab; i < AARPTAB_SIZE; i++, aat++ ) { if ( aat->aat_hold ) { m_freem( aat->aat_hold ); diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index 030105f..3777a23 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -520,7 +520,7 @@ at_ifinit( ifp, aa, sat ) * start off the probes as an asynchronous activity. * though why wait 200mSec? */ - timeout( aarpprobe, (caddr_t)ifp, hz / 5 ); + aa->aa_ch = timeout( aarpprobe, (caddr_t)ifp, hz / 5 ); if ( tsleep( aa, PPAUSE|PCATCH, "at_ifinit", 0 )) { /* * theoretically we shouldn't time out here diff --git a/sys/netatalk/at_var.h b/sys/netatalk/at_var.h index 0e070f7..b6829ba 100644 --- a/sys/netatalk/at_var.h +++ b/sys/netatalk/at_var.h @@ -28,16 +28,17 @@ * but also the legal networks on the interface. */ struct at_ifaddr { - struct ifaddr aa_ifa; + struct ifaddr aa_ifa; # define aa_ifp aa_ifa.ifa_ifp - struct sockaddr_at aa_addr; - struct sockaddr_at aa_broadaddr; + struct sockaddr_at aa_addr; + struct sockaddr_at aa_broadaddr; # define aa_dstaddr aa_broadaddr; - struct sockaddr_at aa_netmask; - int aa_flags; - u_short aa_firstnet, aa_lastnet; - int aa_probcnt; - struct at_ifaddr *aa_next; + struct sockaddr_at aa_netmask; + int aa_flags; + u_short aa_firstnet, aa_lastnet; + int aa_probcnt; + struct callout_handle aa_ch; + struct at_ifaddr *aa_next; }; struct at_aliasreq { diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index f673abf..5412186 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -9,7 +9,7 @@ * Modified by Bill Fenner, PARC, April 1995 * * MROUTING Revision: 3.5 - * $Id: ip_mroute.c,v 1.39 1997/03/24 11:33:28 bde Exp $ + * $Id: ip_mroute.c,v 1.40 1997/07/19 20:07:07 fenner Exp $ */ #include "opt_mrouting.h" @@ -226,6 +226,8 @@ static u_int mrtdebug = 0; /* debug level */ static u_int tbfdebug = 0; /* tbf debug level */ static u_int rsvpdebug = 0; /* rsvp debug level */ +static struct callout_handle expire_upcalls_ch; + #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ #define UPCALL_EXPIRE 6 /* number of timeouts */ @@ -540,7 +542,7 @@ ip_mrouter_init(so, m) pim_assert = 0; - timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT); + expire_upcalls_ch = timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT); if (mrtdebug) log(LOG_DEBUG, "ip_mrouter_init\n"); @@ -584,7 +586,7 @@ X_ip_mrouter_done() numvifs = 0; pim_assert = 0; - untimeout(expire_upcalls, (caddr_t)NULL); + untimeout(expire_upcalls, (caddr_t)NULL, expire_upcalls_ch); /* * Free all multicast forwarding cache entries. @@ -1376,7 +1378,7 @@ expire_upcalls(void *unused) } } splx(s); - timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT); + expire_upcalls_ch = timeout(expire_upcalls, (caddr_t)NULL, EXPIRE_TIMEOUT); } /* diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 7383566..a8b2646 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -218,7 +218,7 @@ pccard_remove_controller(struct slot_ctrl *cp) if (sp->ctrl == cp) { pccard_slots[sp->slot] = 0; if (sp->insert_seq) - untimeout(inserted, (void *)sp); + untimeout(inserted, (void *)sp, sp->insert_ch); /* * Unload the drivers attached to this slot. */ @@ -318,7 +318,7 @@ disable_slot(struct slot *sp) } } /* Power off the slot 1/2 second after remove of the card */ - timeout(power_off_slot, (caddr_t)sp, hz / 2); + sp->poff_ch = timeout(power_off_slot, (caddr_t)sp, hz / 2); sp->pwr_off_pending = 1; /* De-activate all contexts. */ @@ -626,9 +626,10 @@ inserted(void *arg) */ sp->pwr.vcc = 50; sp->pwr.vpp = 0; - untimeout(power_off_slot, (caddr_t)sp); - if (sp->pwr_off_pending) + if (sp->pwr_off_pending) { + untimeout(power_off_slot, (caddr_t)sp, sp->poff_ch); sp->ctrl->disable(sp); + } sp->pwr_off_pending = 0; sp->ctrl->power(sp); printf("Card inserted, slot %d\n", sp->slot); @@ -663,7 +664,7 @@ pccard_event(struct slot *sp, enum card_event event) if (sp->insert_seq) { sp->insert_seq = 0; - untimeout(inserted, (void *)sp); + untimeout(inserted, (void *)sp, sp->insert_ch); } switch(event) { case card_removed: @@ -686,7 +687,7 @@ pccard_event(struct slot *sp, enum card_event event) break; case card_inserted: sp->insert_seq = 1; - timeout(inserted, (void *)sp, hz/4); + sp->insert_ch = timeout(inserted, (void *)sp, hz/4); if (beepok) sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0); beepok = 0; diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index a30b0e4..368c4f2 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -128,6 +128,8 @@ static void pcic_resume(struct slot *); static void pcic_disable __P((struct slot *)); static void pcic_mapirq __P((struct slot *, int)); static timeout_t pcictimeout; +static struct callout_handle pcictimeout_ch + = CALLOUT_HANDLE_INITIALIZER(&pcictimeout_ch); #ifdef LKM static int pcic_handle __P((struct lkm_table *lkmtp, int cmd)); #endif @@ -307,7 +309,7 @@ pcic_unload(struct lkm_table *lkmtp, int cmd) int slot; struct pcic_slot *sp = pcic_slots; - untimeout(pcictimeout,0); + untimeout(pcictimeout,0, pcictimeout_ch); if (pcic_irq) { for (slot = 0; slot < PCIC_MAX_SLOTS; slot++, sp++) { if (sp->slotp) @@ -848,7 +850,7 @@ pcic_probe(void) } #endif /* PC98 */ if (validslots) - timeout(pcictimeout,0,hz/2); + pcictimeout_ch = timeout(pcictimeout,0,hz/2); return(validslots); } @@ -1109,7 +1111,7 @@ pcic_disable(struct slot *slotp) static void pcictimeout(void *chan) { - timeout(pcictimeout,0,hz/2); + pcictimeout_ch = timeout(pcictimeout,0,hz/2); pcicintr(0); } diff --git a/sys/pccard/slot.h b/sys/pccard/slot.h index f9181d8..38e64ea 100644 --- a/sys/pccard/slot.h +++ b/sys/pccard/slot.h @@ -120,6 +120,8 @@ struct slot { * flags. */ unsigned int insert_seq; /* Firing up under the card */ + struct callout_handle insert_ch;/* Insert event timeout handle */ + struct callout_handle poff_ch; /* Power Off timeout handle */ enum cardstate state, laststate; /* Current/last card states */ struct selinfo selp; /* Info for select */ diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index a4d1fcc..09adcf7 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_fxp.c,v 1.39 1997/09/05 10:23:54 davidg Exp $ */ /* @@ -515,6 +515,7 @@ fxp_attach(config_id, unit) if (sc == NULL) return; bzero(sc, sizeof(struct fxp_softc)); + callout_handle_init(&sc->stat_ch); s = splimp(); @@ -1112,7 +1113,7 @@ fxp_stop(sc) /* * Cancel stats updater. */ - untimeout(fxp_stats_update, sc); + untimeout(fxp_stats_update, sc, sc->stat_ch); /* * Issue software reset @@ -1337,7 +1338,7 @@ fxp_init(xsc) /* * Start stats updater. */ - timeout(fxp_stats_update, sc, hz); + sc->stat_ch = timeout(fxp_stats_update, sc, hz); } void diff --git a/sys/pci/if_fxpvar.h b/sys/pci/if_fxpvar.h index 9c7e310..81789d6 100644 --- a/sys/pci/if_fxpvar.h +++ b/sys/pci/if_fxpvar.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_fxpvar.h,v 1.1 1997/09/05 10:23:58 davidg Exp $ */ /* @@ -53,6 +53,7 @@ struct fxp_softc { struct mbuf *rfa_headm; /* first mbuf in receive frame area */ struct mbuf *rfa_tailm; /* last mbuf in receive frame area */ struct fxp_stats *fxp_stats; /* Pointer to interface stats */ + struct callout_handle stat_ch; /* Handle for canceling our stat timeout */ int tx_queued; /* # of active TxCB's */ int promisc_mode; /* promiscuous mode enabled */ int phy_primary_addr; /* address of primary PHY */ diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 2f0ad96..d13fc9e 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.109 1997/09/09 21:52:31 se Exp $ +** $Id: ncr.c,v 1.110 1997/09/10 20:46:11 se Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1113,6 +1113,7 @@ struct ncb { u_short ticks; u_short latetime; u_long lasttime; + struct callout_handle timeout_ch; /*----------------------------------------------- ** Debug and profiling @@ -1340,7 +1341,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.109 1997/09/09 21:52:31 se Exp $\n"; + "\n$Id: ncr.c,v 1.110 1997/09/10 20:46:11 se Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -5534,7 +5535,7 @@ static void ncr_timeout (void *arg) splx (oldspl); } - timeout (ncr_timeout, (caddr_t) np, step ? step : 1); + np->timeout_ch = timeout (ncr_timeout, (caddr_t) np, step ? step : 1); if (INB(nc_istat) & (INTF|SIP|DIP)) { @@ -5895,7 +5896,7 @@ void ncr_exception (ncb_p np) if (i%16==15) printf (".\n"); }; - untimeout (ncr_timeout, (caddr_t) np); + untimeout (ncr_timeout, (caddr_t) np, np->timeout_ch); printf ("%s: halted!\n", ncr_name(np)); /* diff --git a/sys/pci/scsiiom.c b/sys/pci/scsiiom.c index c611518..f178660b 100644 --- a/sys/pci/scsiiom.c +++ b/sys/pci/scsiiom.c @@ -1080,8 +1080,6 @@ SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB ) ULONG swlval; pcmd = pSRB->pcmd; - if( !(pcmd->flags & SCSI_NOMASK) ) - untimeout(DC390_timeout, (caddr_t) pSRB); plink = pcmd->sc_link; status = pSRB->TargetStatus; if(pSRB->SRBFlag & AUTO_REQSENSE) diff --git a/sys/pci/tek390.c b/sys/pci/tek390.c index 06d8d60..b9283dd 100644 --- a/sys/pci/tek390.c +++ b/sys/pci/tek390.c @@ -119,6 +119,10 @@ static void EnableMsgOut2( PACB pACB, PSRB pSRB ); static void EnableMsgOut( PACB pACB, PSRB pSRB ); static void DC390_InvalidCmd( PACB pACB ); +/* + * XXX No timeouts are scheduled in this driver as the timeout handler + * doesn't do anything yet!!! + */ static void DC390_timeout( void *arg1); static void DC390_reset (PACB pACB); static PUCHAR phystovirt( PSRB pSRB, ULONG xferCnt ); @@ -694,7 +698,6 @@ trmamd_scsi_cmd ( PSCSICMD cmd ) { flags = splbio(); SendSRB( pcmd, pACB, pSRB ); - timeout(DC390_timeout, (caddr_t)pSRB, (pcmd->timeout * hz)/1000); splx(flags); return( SUCCESSFULLY_QUEUED); } |