|
|
1.1 ! root 1: /* dlcinit.c - dlcinit */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <slu11.h> ! 6: #include <proc.h> ! 7: #include <sleep.h> ! 8: #include <dlc.h> ! 9: ! 10: struct dlblk dlc[Ndlc]; ! 11: ! 12: /*------------------------------------------------------------------------ ! 13: * dlcinit -- initialize dlc control block and device ! 14: *------------------------------------------------------------------------ ! 15: */ ! 16: dlcinit(devptr) ! 17: struct devsw *devptr; ! 18: { ! 19: struct dlblk *dptr; ! 20: struct csr *cptr; ! 21: char ps; ! 22: int junk; ! 23: ! 24: return; /* to make MECB version work******** */ ! 25: ! 26: disable(ps); ! 27: dptr = &dlc[devptr->dvminor]; ! 28: devptr->dvioblk = dptr; ! 29: iosetvec(devptr->dvnum, dptr, dptr); ! 30: dptr->dioaddr = devptr->dvcsr; ! 31: dptr->dostall = 0; ! 32: dptr->distate = DLIINIT; ! 33: dptr->dostate = DLOINIT; ! 34: dptr->donext = dptr->dinext = NULL; ! 35: dptr->doesc = dptr->diesc = 0; ! 36: dptr->dpid = 0; ! 37: dptr->dovalid = FALSE; ! 38: dptr->diproc = dptr->doproc = -1; ! 39: dptr->dotot = dptr->docount = 0; ! 40: dptr->dimax = dptr->dicount = 0; ! 41: cptr = dptr->dioaddr; /* get device CSR address */ ! 42: junk = cptr->crbuf; /* clear device receiver and */ ! 43: cptr->crstat = SLUENABLE; /* enable read interrupts */ ! 44: cptr->ctstat = SLUDISABLE; /* disable write interrupts */ ! 45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.