diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2009-07-03 17:05:54 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2009-07-03 17:05:54 +0000 |
| commit | a97d19521cfee71665bf96f49c9a0f2edcd04a65 (patch) | |
| tree | a968212fbb95d7c6f7aa8e0a3038de1526e3129c /sys/arch/atari/dev | |
| parent | 2d29649a47e53c7e8723f0d3b5fa55d3e71bb795 (diff) | |
Replace traditional MD si_callback() with MI softint(9).
Diffstat (limited to 'sys/arch/atari/dev')
| -rw-r--r-- | sys/arch/atari/dev/ser.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/arch/atari/dev/ser.c b/sys/arch/atari/dev/ser.c index 73e5c0b800e..0a6c6d80a03 100644 --- a/sys/arch/atari/dev/ser.c +++ b/sys/arch/atari/dev/ser.c @@ -1,4 +1,4 @@ -/* $NetBSD: ser.c,v 1.42 2009/03/14 21:04:06 dsl Exp $ */ +/* $NetBSD: ser.c,v 1.43 2009/07/03 17:05:54 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.42 2009/03/14 21:04:06 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.43 2009/07/03 17:05:54 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -200,6 +200,8 @@ struct ser_softc { int sc_heldtbc; volatile u_char sc_heldchange; + + void *sc_sicookie; }; /* @@ -235,8 +237,6 @@ static int serspeed(long); static void sersoft(void *); static void sertxint(struct ser_softc *, struct tty*); -static volatile int ser_softintr_scheduled = 0; - /* * Autoconfig stuff */ @@ -297,6 +297,8 @@ serattach(struct device *pdp, struct device *dp, void *auxp) if (intr_establish(12, USER_VEC, 0, (hw_ifun_t)sertrintr, sc) == NULL) printf("serattach: Can't establish interrupt (12)\n"); + sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, sersoft, sc); + ym2149_rts(1); ym2149_dtr(1); @@ -1152,8 +1154,6 @@ sersoft(void *arg) struct ser_softc *sc = arg; struct tty *tp; - ser_softintr_scheduled = 0; - tp = sc->sc_tty; if (tp == NULL) return; @@ -1205,8 +1205,7 @@ sermintr(void *arg) sc->sc_st_check = 1; } - if (!ser_softintr_scheduled) - add_sicallback((si_farg)sersoft, sc, 0); + softint_schedule(sc->sc_sicookie); return 1; } @@ -1286,9 +1285,7 @@ sertrintr(void *arg) sc->sc_tx_done = 1; } } - - if (!ser_softintr_scheduled) - add_sicallback((si_farg)sersoft, sc, 0); + softint_schedule(sc->sc_sicookie); return 1; } |
