Lines Matching refs:ir
87 struct fw_xferq *ir; member
220 if (d->ir != NULL) { in fw_close()
221 struct fw_xferq *ir = d->ir; in fw_close() local
223 if ((ir->flag & FWXFERQ_OPEN) == 0) in fw_close()
225 if (ir->flag & FWXFERQ_RUNNING) { in fw_close()
226 ir->flag &= ~FWXFERQ_RUNNING; in fw_close()
227 fc->irx_disable(fc, ir->dmach); in fw_close()
230 fwdev_freebuf(ir); in fw_close()
232 for (xfer = STAILQ_FIRST(&ir->q); in fw_close()
233 xfer != NULL; xfer = STAILQ_FIRST(&ir->q)) { in fw_close()
234 ir->queued--; in fw_close()
235 STAILQ_REMOVE_HEAD(&ir->q, link); in fw_close()
240 ir->flag &= ~(FWXFERQ_OPEN | FWXFERQ_MODEMASK | in fw_close()
242 d->ir = NULL; in fw_close()
317 struct fw_xferq *ir; in fw_read() local
327 ir = d->ir; in fw_read()
329 if (ir == NULL) in fw_read()
332 if (ir->buf == NULL) in fw_read()
337 if (ir->stproc == NULL) { in fw_read()
339 ir->stproc = STAILQ_FIRST(&ir->stvalid); in fw_read()
340 if (ir->stproc != NULL) { in fw_read()
342 STAILQ_REMOVE_HEAD(&ir->stvalid, link); in fw_read()
344 ir->queued = 0; in fw_read()
347 if (ir->stproc == NULL) { in fw_read()
351 ir->flag |= FWXFERQ_WAKEUP; in fw_read()
352 err = msleep(ir, FW_GMTX(fc), FWPRI, "fw_read", hz); in fw_read()
353 ir->flag &= ~FWXFERQ_WAKEUP; in fw_read()
360 } else if (ir->stproc != NULL) { in fw_read()
363 fp = (struct fw_pkt *)fwdma_v_addr(ir->buf, in fw_read()
364 ir->stproc->poffset + ir->queued); in fw_read()
373 ir->queued++; in fw_read()
374 if (ir->queued >= ir->bnpacket) { in fw_read()
376 STAILQ_INSERT_TAIL(&ir->stfree, ir->stproc, link); in fw_read()
378 fc->irx_enable(fc, ir->dmach); in fw_read()
379 ir->stproc = NULL; in fw_read()
381 if (uio->uio_resid >= ir->psize) { in fw_read()
545 struct fw_xferq *ir, *it; in fw_ioctl() local
566 ir = d->ir; in fw_ioctl()
597 if (ir == NULL) { in fw_ioctl()
603 ir = fc->ir[i]; in fw_ioctl()
604 err = fwdev_allocbuf(fc, ir, &d->bufreq.rx); in fw_ioctl()
606 ir->flag &= ~FWXFERQ_OPEN; in fw_ioctl()
610 ir->flag &= ~0xff; in fw_ioctl()
611 ir->flag |= (0x3f & ichreq->ch); in fw_ioctl()
612 ir->flag |= ((0x3 & ichreq->tag) << 6); in fw_ioctl()
613 d->ir = ir; in fw_ioctl()
614 err = fc->irx_enable(fc, ir->dmach); in fw_ioctl()
617 if (d->ir != NULL) { in fw_ioctl()
618 ichreq->ch = ir->flag & 0x3f; in fw_ioctl()
619 ichreq->tag = ir->flag >> 2 & 0x3; in fw_ioctl()
628 if (ir != NULL) { in fw_ioctl()
629 ibufreq->rx.nchunk = ir->bnchunk; in fw_ioctl()
630 ibufreq->rx.npacket = ir->bnpacket; in fw_ioctl()
631 ibufreq->rx.psize = ir->psize; in fw_ioctl()
822 struct fw_xferq *ir; in fw_poll() local
829 ir = ((struct fw_drv1 *)dev->si_drv1)->ir; in fw_poll()
833 if (STAILQ_FIRST(&ir->q) != NULL) in fw_poll()
836 selrecord(td, &ir->rsel); in fw_poll()