Lines Matching defs:iopb
156 * XDC_GO: start iopb ADDR (DVMA addr in a u_long) on XDC
216 * [2] & of xdc_softc's "nfree" (waiting for a free iorq/iopb)
217 * [3] & of xdc_softc's "ndone" (waiting for number of done iorq/iopb's
452 /* init free list, iorq to iopb pointers, and non-zero fields in the
453 * iopb which never change. */
456 xdc->reqs[lcv].iopb = &xdc->iopbase[lcv];
1123 /* now we have free iopb's and we are at splbio... start 'em up */
1200 xdc_rqtopb(struct xd_iorq *iorq, struct xd_iopb *iopb, int cmd, int subfun)
1206 iopb->errs = iopb->done = 0;
1207 iopb->comm = cmd;
1208 iopb->errno = iopb->status = 0;
1209 iopb->subfun = subfun;
1211 iopb->unit = iorq->xd->xd_drive;
1213 iopb->unit = 0;
1221 (struct xd_iopb_ctrl *)iopb;
1222 iopb->lll = 0;
1223 iopb->intl = (XD_STATE(iorq->mode) == XD_SUB_POLL)
1243 (struct xd_iopb_drive *)iopb;
1263 (struct xd_iopb_format *)iopb;
1284 iopb->lll = 0;
1285 iopb->intl = (XD_STATE(iorq->mode) == XD_SUB_POLL)
1287 iopb->sectcnt = iorq->sectcnt;
1290 iopb->sectno = iopb->headno = iopb->cylno = 0;
1292 iopb->sectno = block % iorq->xd->nsect;
1294 iopb->headno = block % iorq->xd->nhead;
1296 iopb->cylno = block;
1298 iopb->daddr = dp = (iorq->dbuf == NULL) ? 0 :
1300 iopb->addrmod = XDC_ADDRMOD;
1314 struct xd_iopb *iopb;
1318 /* get iorq/iopb */
1348 iopb = iorq->iopb;
1351 /* init iorq/iopb */
1357 xdc_rqtopb(iorq, iopb, cmd, subfn);
1374 struct xd_iopb *iopb;
1382 iopb = iorq->iopb;
1435 /* init iorq and load iopb from it */
1440 xdc_rqtopb(iorq, iopb, (bp->b_flags & B_READ) ? XDCMD_RD : XDCMD_WR, 0);
1471 * iopb structure. the hardware understands the iopb structure.
1472 * every command must go through an iopb. a 7053 can only handle
1474 * DVMA space at boot up time. what happens if we run out of iopb's?
1478 * return when one iopb is free. for case [3] the process can sleep
1505 while (iorq->iopb->done == 0) {
1517 u_char *rio = (u_char *)iorq->iopb;
1528 iopbaddr = dvma_kvtopa(iorq->iopb, xdcsc->bustype);
1537 while (iorq->iopb->done == 0) {
1632 * we steal iopb[0] for this, but we put it back when we are done.
1781 struct xd_iopb *iopb;
1803 * get iopb that is done
1823 iopb = &xdcsc->iopbase[rqno];
1824 if (iopb->done == 0)
1829 u_char *rio = (u_char *)iopb;
1842 comm = iopb->comm;
1843 errs = iopb->errs;
1846 iorq->errno = iopb->errno;
1853 xdc_error(xdcsc, iorq, iopb, rqno, comm) == XD_ERR_AOK)
1860 xdc_perror(iorq, iopb, 0);
1882 iorq->lasterror = iorq->errno = iopb->errno = 0;
1883 iopb->errs = iopb->done = 0;
1885 iopb->sectcnt = iorq->sectcnt;
1886 iopb->cylno =
1888 iopb->headno =
1891 iopb->sectno = iorq->blockno % XDFM_BPS;
1892 iopb->daddr =
1943 xdc_perror(struct xd_iorq *iorq, struct xd_iopb *iopb, int still_trying)
1952 if (iopb->comm == XDCMD_RD || iopb->comm == XDCMD_WR)
1954 (iopb->comm == XDCMD_RD) ? "read" : "write",
1955 iopb->cylno, iopb->headno, iopb->sectno);
1969 * return AOK if resubmitted, return FAIL if this iopb is done
1972 xdc_error(struct xdc_softc *xdcsc, struct xd_iorq *iorq, struct xd_iopb *iopb,
1994 advance = iorq->sectcnt - iopb->sectcnt;
2002 iopb->errno = iopb->done = iopb->errs = 0;
2003 iopb->sectcnt = 1;
2004 iopb->cylno = (iorq->xd->ncyl + iorq->xd->acyl) - 2;
2008 iopb->headno = i / iorq->xd->nhead;
2009 iopb->sectno = i % iorq->xd->nhead;
2021 xdc_perror(iorq, iopb, 1); /* inform of error state
2028 iorq->errno = iopb->errno = iopb->done = iopb->errs = 0;