TCP-group 1991
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Shared interrupts
- To: tcp-group@ucsd.edu
- Subject: Shared interrupts
- From: mwester@sunbird.Central.Sun.COM (Mike Westerhof SE Chicago Metro)
- Date: Thu, 24 Jan 91 09:57:01 CST
Yes, Jim, N9GTM has hacked NOS to use shared-interrupt boards.
Since it's not very long, I'll just include it below. If you encounter
problems, I can forward mail to Jim.
Mike (KA9WSB)
/* Interrupt handler for 8250 asynch chip */
/* Support multiple ports sharing same IRQ n9gtm Dec 21, 1990 */
/* Added support for multiple serial ports hanging off same IRQ. */
/* You might need to slow down the ports' baud rate.... */
/* Replacement for 8250.c AYSINT routine PRE-RELEASE version */
void
asyint(dev)
int dev;
{
struct asy *asyp;
struct asy *myasyp;
unsigned base;
char iir;
int mydev;
asyp = &Asy[dev];
for (mydev=0; mydev < ASY_MAX; mydev++) {
myasyp = &Asy[mydev];
if (myasyp->iface != NULLIF)
if (myasyp->vec == asyp->vec) {
base = myasyp->addr;
while(((iir = inportb(base+IIR)) & IIR_IP) == 0){
switch(iir & IIR_ID){
case IIR_RDA: /* Receiver interrupt */
asyrxint(myasyp);
break;
case IIR_THRE: /* Transmit interrupt */
asytxint(mydev);
break;
case IIR_MSTAT: /* Modem status change */
asymsint(mydev);
myasyp->cts_flow_ints++;
break;
}
/* should happen at end of a single slip packet */
if(iir & IIR_FIFO_TIMEOUT)
myasyp->fifotimeouts++;
}
}
}
}
----- End Included Message -----