sc->vbase[CD2400_TEOIR] = 0x08; return (1);
sc->cl_reg->cl_teoir = 0x08; return 1;
cl_txintr(sc)	struct clsoftc *sc;{	static empty = 0;	u_char tir, licr, teoir;	u_char max;	int channel;	struct tty *tp;	int cnt;	u_char buffer[CL_FIFO_MAX +1];	u_char *tptr;	tir = sc->vbase[CD2400_TIR];	if ((tir & 0x40) == 0x0) {		/* only if intr is not shared ??? */		printf("cl_txintr extra intr\n");		return (0);	}	sc->sc_txintrcnt.ev_count++;	channel = tir & 0x03;	licr = sc->vbase[CD2400_LICR];		sc->sc_cl[channel].txcnt ++;	tp = sc->sc_cl[channel].tty;	if (tp == NULL || (tp->t_state & TS_ISOPEN) == 0) {		sc->vbase[CD2400_TEOIR] = 0x08;		return (1);	}	switch ((licr >> 4) & 0x3) {	case CL_DMAMODE:		teoir = 0x08;		break;	case CL_INTRMODE:		max = sc->vbase[CD2400_TFTC];		cnt = min((int)max, tp->t_outq.c_cc);		if (cnt != 0) {			cnt = q_to_b(&tp->t_outq, buffer, cnt);			empty = 0;			for (tptr = buffer; tptr < &buffer[cnt]; tptr++) {				sc->vbase[CD2400_TDR]= *tptr;			}			teoir = 0x00;		} else {			if (empty > 5 && (empty % 20000 ) == 0) {				printf("cl_txintr: too many empty intr %d chan %d\n",				    empty, channel);			}			empty++;			teoir = 0x08;			if (tp->t_state & TS_BUSY) {				tp->t_state &= ~(TS_BUSY | TS_FLUSH);				if (tp->t_state & TS_ASLEEP) {					tp->t_state &= ~TS_ASLEEP;					wakeup((caddr_t)&tp->t_outq);				}				selwakeup(&tp->t_wsel);			}			sc->vbase[CD2400_IER] = sc->vbase[CD2400_IER] & ~0x3;		}		break;	default:		printf("cl_txintr unknown mode %x\n", (licr >> 4) & 0x3);		/* we probably will go to hell quickly now */		teoir = 0x08;	}	sc->vbase[CD2400_TEOIR] = teoir;	return (1);}