diff options
author | gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:41:49 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:41:49 +0000 |
commit | e1b0aaaa7646122022e6179a0b6406809f2126b8 (patch) | |
tree | 453c2e0b2fbd7526c2bfa12a66b852f740856480 /sys/i386/isa/tw.c | |
parent | dc043d9d0aa92d02293099dc6adcabe0e6c972cb (diff) | |
download | FreeBSD-src-e1b0aaaa7646122022e6179a0b6406809f2126b8.zip FreeBSD-src-e1b0aaaa7646122022e6179a0b6406809f2126b8.tar.gz |
aha1542.c aic6360.c cy.c fd.c ft.c
if_ie.c if_wl.c if_zp.c isa.c isa_device.h
labpc.c mcd.c ncr5380.c scd.c seagate.c si.c
sio.c tw.c ultra14f.c wcd.c wd.c:
Update for changes in the callout interface.
apic_vector.s icu_vector.s ipl.s ipl_funcs.c:
Add CAM software/hardware interrupt support.
Diffstat (limited to 'sys/i386/isa/tw.c')
-rw-r--r-- | sys/i386/isa/tw.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c index 6c08fae..64671cc 100644 --- a/sys/i386/isa/tw.c +++ b/sys/i386/isa/tw.c @@ -250,6 +250,8 @@ static struct tw_sc { u_char sc_buf[TW_SIZE]; /* We buffer our own input */ int sc_nextin; /* Next free slot in circular buffer */ int sc_nextout; /* First used slot in circular buffer */ + /* Callout for canceling our abortrcv timeout */ + struct callout_handle abortrcv_ch; #ifdef HIRESTIME int sc_xtimes[22]; /* Times for bits in current xmit packet */ int sc_rtimes[22]; /* Times for bits in current rcv packet */ @@ -391,6 +393,7 @@ static int twattach(idp) sc->sc_port = idp->id_iobase; sc->sc_state = 0; sc->sc_rcount = 0; + callout_handle_init(&sc->abortrcv_ch); #ifdef DEVFS sc->devfs_token = @@ -948,13 +951,13 @@ int unit; sc->sc_bits = 0; sc->sc_rphase = newphase; /* 3 cycles of silence = 3/60 = 1/20 = 50 msec */ - timeout(twabortrcv, (caddr_t)sc, hz/20); + sc->abortrcv_ch = timeout(twabortrcv, (caddr_t)sc, hz/20); sc->sc_rcv_time[0] = tv.tv_usec; sc->sc_no_rcv = 1; return; } - untimeout(twabortrcv, (caddr_t)sc); - timeout(twabortrcv, (caddr_t)sc, hz/20); + untimeout(twabortrcv, (caddr_t)sc, sc->abortrcv_ch); + sc->abortrcv_ch = timeout(twabortrcv, (caddr_t)sc, hz/20); newphase = inb(port + tw_zcport) & tw_zcmask; /* enforce a minimum delay since the last interrupt */ @@ -988,7 +991,7 @@ int unit; */ sc->sc_state &= ~TWS_RCVING; sc->sc_flags |= TW_RCV_ERROR; - untimeout(twabortrcv, (caddr_t)sc); + untimeout(twabortrcv, (caddr_t)sc, sc->abortrcv_ch); log(LOG_ERR, "TWRCV: Invalid start code\n"); twdebugtimes(sc); sc->sc_no_rcv = 0; @@ -1076,7 +1079,7 @@ int unit; } sc->sc_state &= ~TWS_RCVING; twputpkt(sc, pkt); - untimeout(twabortrcv, (caddr_t)sc); + untimeout(twabortrcv, (caddr_t)sc, sc->abortrcv_ch); if(sc->sc_flags & TW_RCV_ERROR) { log(LOG_ERR, "TWRCV: invalid packet: (%d, %x) %c %d\n", sc->sc_rcount, sc->sc_bits, 'A' + pkt[1], X10_KEY_LABEL[pkt[2]]); |