Lines Matching defs:iopb
96 * XYC_GO: start iopb ADDR (DVMA addr in a u_long) on XYC
497 * init iorq to iopb pointers, and non-zero fields in the
498 * iopb which never change.
503 xyc->reqs[lcv].iopb = &xyc->iopbase[lcv];
740 * of the disk. the drive type in the IOPB must match the drive
1288 * xyc_rqtopb: load up an IOPB based on an iorq
1292 xyc_rqtopb(struct xy_iorq *iorq, struct xy_iopb *iopb, int cmd, int subfun)
1296 /* normal IOPB case, standard stuff */
1299 iopb->ien = (XY_STATE(iorq->mode) == XY_SUB_POLL) ? 0 : 1;
1300 iopb->com = cmd;
1301 iopb->errnum = 0;
1302 iopb->errs = 0;
1303 iopb->done = 0;
1305 iopb->unit = iorq->xy->xy_drive;
1306 iopb->dt = iorq->xy->drive_type;
1308 iopb->unit = 0;
1309 iopb->dt = 0;
1313 iopb->sect = iopb->head = iopb->cyl = 0;
1315 iopb->sect = block % iorq->xy->nsect;
1317 iopb
1319 iopb->cyl = block;
1321 iopb->scnt = iorq->sectcnt;
1324 iopb->dataa = 0;
1325 iopb->datar = 0;
1327 iopb->dataa = (dp & 0xffff);
1328 iopb->datar = ((dp & 0xff0000) >> 16);
1330 iopb->subfn = subfun;
1359 struct xy_iopb *iopb = xycsc->ciopb;
1374 printf("%s: stole control iopb\n", device_xname(xycsc->sc_dev));
1377 /* init iorq/iopb */
1383 /* load IOPB from iorq */
1385 xyc_rqtopb(iorq, iopb, cmd, subfn);
1407 struct xy_iopb *iopb;
1411 iopb = iorq->iopb;
1448 /* init iorq and load iopb from it */
1454 xyc_rqtopb(iorq, iopb, (bp->b_flags & B_READ) ? XYCMD_RD : XYCMD_WR, 0);
1482 * iopb structure. the hardware understands the iopb structure.
1483 * every command must go through an iopb. a 450 handles one iopb at a
1485 * can handle chains, but is appears to be buggy...] iopb are allocated
1486 * in DVMA space at boot up time. each disk gets one iopb, and the
1488 * the iopb is busy? for i/o type [1], the buffers are queued at the
1492 * and then steal the IOPB. for case [3] the process can sleep
1518 while (iorq->iopb->done == 0) {
1549 while (iorq->iopb->done == 0) {
1576 * promote control IOPB to the top
1591 iorq->iopb->chen = 0;
1604 struct xy_iopb *iopb, *prev_iopb, *dmaiopb;
1611 iopb = xycsc->xy_chain[chain]->iopb;
1612 iopb->chen = 0;
1615 prev_iopb = xycsc->xy_chain[chain-1]->iopb;
1650 while (iorq->iopb->done == 0) {
1674 if (iorq->iopb->done == 0)
1696 * we steal iopb[XYC_CTLIOPB] for this, but we put it back when we are done.
1702 struct xy_iopb *iopb;
1705 iopb = xycsc->ciopb;
1708 memcpy(&tmpiopb, iopb, sizeof(struct xy_iopb));
1710 iopb->chen = iopb->done = iopb->errs = 0;
1711 iopb->ien = 0;
1712 iopb->com = XYCMD_RST;
1713 iopb->unit = xysc->xy_drive;
1725 if (del <= 0 || iopb->errs) {
1727 xyc_e2str(iopb->errnum));
1736 memcpy(iopb, &tmpiopb, sizeof(struct xy_iopb));
1845 * xyc_remove_iorq: remove "done" IOPB's.
1854 struct xy_iopb *iopb;
1861 * error is so bad, you can't even tell which IOPB is bad, so
1874 * get iopb that is done, loop down the chain
1889 iopb = iorq->iopb;
1890 if (iopb->done == 0)
1893 comm = iopb->com;
1894 errs = iopb->errs;
1897 iorq->errnum = iopb->errnum;
1904 xyc_error(xycsc, iorq, iopb, comm) == XY_ERR_AOK)
1911 xyc_perror(iorq, iopb, 0);
1933 iorq->lasterror = iorq->errnum = iopb->errnum = 0;
1934 iopb->errs = iopb->done = 0;
1936 iopb->scnt = iorq->sectcnt;
1937 iopb->cyl = iorq->blockno /
1939 iopb->head =
1942 iopb->sect = iorq->blockno % XYFM_BPS;
1944 iopb->dataa = (addr & 0xffff);
1945 iopb->datar = ((addr & 0xff0000) >> 16);
1999 xyc_perror(struct xy_iorq *iorq, struct xy_iopb *iopb, int still_trying)
2008 if (iopb->com == XYCMD_RD || iopb->com == XYCMD_WR)
2010 (iopb->com == XYCMD_RD) ? "read" : "write",
2011 iopb->cyl, iopb->head, iopb->sect);
2025 * return AOK if resubmitted, return FAIL if this iopb is done
2028 xyc_error(struct xyc_softc *xycsc, struct xy_iorq *iorq, struct xy_iopb *iopb,
2050 advance = iorq->sectcnt - iopb->scnt;
2058 iopb->errnum = iopb->done = iopb->errs = 0;
2059 iopb->scnt = 1;
2060 iopb->cyl = (iorq->xy->ncyl + iorq->xy->acyl) - 2;
2064 iopb->head = i / iorq->xy->nhead;
2065 iopb->sect = i % iorq->xy->nhead;
2077 xyc_perror(iorq, iopb, 1); /* inform of error state
2084 iorq->errnum = iopb->errnum = iopb->done = iopb->errs = 0;