Lines Matching defs:iopb
140 * XDC_GO: start iopb ADDR (DVMA addr in a u_long) on XDC
195 * [2] & of xdc_softc's "nfree" (waiting for a free iorq/iopb)
196 * [3] & of xdc_softc's "ndone" (waiting for number of done iorq/iopb's
590 /* init free list, iorq to iopb pointers, and non-zero fields in the
591 * iopb which never change. */
594 xdc->reqs[lcv].iopb = &xdc->iopbase[lcv];
1304 /* now we have free iopb's and we are at splbio... start 'em up */
1379 * xdc_rqtopb: load up an IOPB based on an iorq
1383 xdc_rqtopb(struct xd_iorq *iorq, struct xd_iopb *iopb, int cmd, int subfun)
1389 iopb->errs = iopb->done = 0;
1390 iopb->comm = cmd;
1391 iopb->errnum = iopb->status = 0;
1392 iopb->subfun = subfun;
1394 iopb->unit = iorq->xd->xd_drive;
1396 iopb->unit = 0;
1398 /* check for alternate IOPB format */
1404 (struct xd_iopb_ctrl *) iopb;
1405 iopb->lll = 0;
1406 iopb->intl = (XD_STATE(iorq->mode) == XD_SUB_POLL)
1419 (struct xd_iopb_drive *)iopb;
1438 (struct xd_iopb_format *) iopb;
1456 /* normal IOPB case (harmless to RDP command) */
1458 iopb->lll = 0;
1459 iopb->intl = (XD_STATE(iorq->mode) == XD_SUB_POLL)
1462 iopb->sectcnt = iorq->sectcnt;
1465 iopb->sectno = iopb->headno = iopb->cylno = 0;
1467 iopb->sectno = block % iorq->xd->nsect;
1469 iopb->headno = block % iorq->xd->nhead;
1471 iopb->cylno = block;
1474 dp = iopb->daddr = (iorq->dbuf == NULL) ? 0 : dp;
1475 iopb->addrmod = ((dp + (XDFM_BPS * iorq->sectcnt)) > 0x1000000)
1492 struct xd_iopb *iopb;
1494 /* get iorq/iopb */
1524 iopb = iorq->iopb;
1527 /* init iorq/iopb */
1533 /* load IOPB from iorq */
1535 xdc_rqtopb(iorq, iopb, cmd, subfn);
1553 struct xd_iopb *iopb;
1562 iopb = iorq->iopb;
1605 /* init iorq and load iopb from it */
1611 xdc_rqtopb(iorq, iopb, (bp->b_flags & B_READ) ? XDCMD_RD : XDCMD_WR, 0);
1642 * iopb structure. the hardware understands the iopb structure.
1643 * every command must go through an iopb. a 7053 can only handle
1645 * DVMA space at boot up time. what happens if we run out of iopb's?
1649 * return when one iopb is free. for case [3] the process can sleep
1677 while (iorq->iopb->done == 0) {
1689 u_char *rio = (u_char *) iorq->iopb;
1709 while (iorq->iopb->done == 0) {
1803 * we steal iopb[0] for this, but we put it back when we are done.
1952 * xdc_remove_iorq: remove "done" IOPB's.
1960 struct xd_iopb *iopb;
1967 * error is so bad, you can't even tell which IOPB is bad, so
1981 * get iopb that is done
1983 * hmm... I used to read the address of the done IOPB off the VME
1990 * problem, it is just easier to look at all running IOPB's for the
2001 iopb = &xdcsc->iopbase[rqno];
2002 if (iopb->done == 0)
2007 u_char *rio = (u_char *) iopb;
2018 comm = iopb->comm;
2019 errs = iopb->errs;
2022 iorq->errnum = iopb->errnum;
2029 xdc_error(xdcsc, iorq, iopb, rqno, comm) == XD_ERR_AOK)
2036 xdc_perror(iorq, iopb, 0);
2058 iorq->lasterror = iorq->errnum = iopb->errnum = 0;
2059 iopb->errs = iopb->done = 0;
2061 iopb->sectcnt = iorq->sectcnt;
2062 iopb->cylno = iorq->blockno /
2064 iopb->headno =
2067 iopb->sectno = iorq->blockno % XDFM_BPS;
2068 iopb->daddr = (u_long) iorq->dbuf;
2123 xdc_perror(struct xd_iorq *iorq, struct xd_iopb *iopb, int still_trying)
2133 if (iopb->comm == XDCMD_RD || iopb->comm == XDCMD_WR)
2135 (iopb->comm == XDCMD_RD) ? "read" : "write",
2136 iopb->cylno, iopb->headno, iopb->sectno);
2150 * return AOK if resubmitted, return FAIL if this iopb is done
2153 xdc_error(struct xdc_softc *xdcsc, struct xd_iorq *iorq, struct xd_iopb *iopb,
2178 advance = iorq->sectcnt - iopb->sectcnt;
2186 iopb->errnum = iopb->done = iopb->errs = 0;
2187 iopb->sectcnt = 1;
2188 iopb->cylno = (iorq->xd->ncyl + iorq->xd->acyl) - 2;
2192 iopb->headno = i / iorq->xd->nhead;
2193 iopb->sectno = i % iorq->xd->nhead;
2206 xdc_perror(iorq, iopb, 1); /* inform of error state
2213 iorq->errnum = iopb->errnum = iopb->done = iopb->errs = 0;
2244 printf("%s: diag: IOPB miscount (got w/f/r/d %d/%d/%d/%d, wanted %d)\n",
2496 return ("Next IOPB address alignment error");
2560 return ("IOPB checksum miscompare");
2562 return ("IOPB DMA fatal");
2564 return ("IOPB address alignment error");