|
|
1.1 ! root 1: /* dskstrt.c - dskstrt */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <disk.h> ! 6: ! 7: /*------------------------------------------------------------------------ ! 8: * dskstrt -- start an I/O operation on a disk device ! 9: *------------------------------------------------------------------------ ! 10: */ ! 11: dskstrt(dsptr) ! 12: struct dsblk *dsptr; ! 13: { ! 14: struct xbdcb *xptr; ! 15: struct dtc *dtptr; ! 16: struct dreq *drptr; ! 17: ! 18: /* build command for controller */ ! 19: ! 20: drptr = dsptr->dreqlst; ! 21: xptr = & dsptr->ddcb; ! 22: xptr->xop = (char) drptr->drop; /* opcode */ ! 23: xptr->xunit = (char) 0; /* top addr bits*/ ! 24: xptr->xmaddr = (char) ((drptr->drdba>>8)&0377); /* mid addr bits*/ ! 25: xptr->xladdr = (char) (drptr->drdba & 0377); /* low addr bits*/ ! 26: xptr->xcount = (char) 1; /* num of blocks*/ ! 27: xptr->xcntl = (char) XRETRY; /* retry code */ ! 28: ! 29: /* feed command to controller through interface */ ! 30: ! 31: dtptr = dsptr->dcsr; ! 32: dtptr->dt_dar = drptr->drbuff; ! 33: dtptr->dt_car = xptr; ! 34: dtptr->dt_xdar = dtptr->dt_xcar = 0; ! 35: dtptr->dt_csr = DTINTR | DTGO; ! 36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.