if (isr & (IRXRDYA | IRXRDYB)) { dprintf(("dartintr: Rx interrupt\n")); dartrint(sc, port); } if (isr & (ITXRDYA | ITXRDYB)) { dprintf(("dartintr: Tx interrupt\n")); dartxint(sc, port); } if (((port == A_PORT) && (isr & IBRKA)) || ((port == B_PORT) && (isr & IBRKB))) { union dart_pt_io *ptaddr = (union dart_pt_io *)addr + port;
dprintf(("dartintr: interrupt from port %d, isr 0x%08x\n", port, isr));
dartintr(arg)	void *arg;{	struct dartsoftc *sc = arg;	unsigned char isr;	int port;	union dartreg *addr;	/* read interrupt status register and mask with imr */	addr = sc->dart_reg;	isr = addr->read.rd_isr;	isr &= dart_sv_reg.sv_imr;	if (isr) {     /* interrupt from this duart */		sc->sc_intrcnt.ec_count++;		if (isr & IIPCHG) {			unsigned int ip = addr->read.rd_ip;			unsigned int ipcr = addr->read.rd_ipcr;			dartmodemtrans(sc, ip, ipcr);			return 1;		}		if (isr & (IRXRDYA | ITXRDYA))			port = 0;		else			if (isr & (IRXRDYB | ITXRDYB))			port = 1;		else {			printf("dartintr: spurious interrupt, isr 0x%08x\n", isr);			panic("dartintr");		}		dprintf(("dartintr: interrupt from port %d, isr 0x%08x\n",			 port, isr));		if (isr & (IRXRDYA | IRXRDYB)) {			dprintf(("dartintr: Rx interrupt\n"));			dartrint(sc, port);		}		if (isr & (ITXRDYA | ITXRDYB)) {			dprintf(("dartintr: Tx interrupt\n"));			dartxint(sc, port);		}		if (((port == A_PORT) && (isr & IBRKA))		    || ((port == B_PORT) && (isr & IBRKB))) {			union dart_pt_io *ptaddr =			(union dart_pt_io *)addr + port;			dprintf(("dartintr: clearing end of BREAK state\n"));			ptaddr->write.wr_cr = BRKINTRESET;		}	}	dprintf(("dartintr: ready\n"));	return 1;}