Lines Matching refs:fc

101 	struct firewire_comm *fc;  member
132 mutex_enter(&sc->fc->fc_mtx); in fw_open()
134 mutex_exit(&sc->fc->fc_mtx); in fw_open()
139 mutex_exit(&sc->fc->fc_mtx); in fw_open()
146 d->fc = sc->fc; in fw_open()
158 struct firewire_comm *fc; in fw_close() local
172 fc = d->fc; in fw_close()
177 fw_bindremove(fc, fwb); in fw_close()
189 fc->irx_disable(fc, ir->dmach); in fw_close()
214 fc->itx_disable(fc, it->dmach); in fw_close()
233 struct firewire_comm *fc; in fw_read() local
247 fc = d->fc; in fw_read()
256 mutex_enter(&fc->fc_mtx); in fw_read()
271 err = cv_timedwait_sig(&ir->cv, &fc->fc_mtx, hz); in fw_read()
277 mutex_exit(&fc->fc_mtx); in fw_read()
281 mutex_exit(&fc->fc_mtx); in fw_read()
284 if (fc->irx_post != NULL) in fw_read()
285 fc->irx_post(fc, fp->mode.ld); in fw_read()
293 fc->irx_enable(fc, ir->dmach); in fw_read()
298 mutex_enter(&fc->fc_mtx); in fw_read()
302 mutex_exit(&fc->fc_mtx); in fw_read()
310 struct firewire_comm *fc; in fw_write() local
324 fc = d->fc; in fw_write()
333 mutex_enter(&fc->fc_mtx); in fw_write()
343 err = fc->itx_enable(fc, it->dmach); in fw_write()
347 err = cv_timedwait_sig(&it->cv, &fc->fc_mtx, hz); in fw_write()
356 mutex_exit(&fc->fc_mtx); in fw_write()
368 err = fc->itx_enable(fc, it->dmach); in fw_write()
372 mutex_enter(&fc->fc_mtx); in fw_write()
378 mutex_exit(&fc->fc_mtx); in fw_write()
386 struct firewire_comm *fc; in fw_ioctl() local
414 fc = d->fc; in fw_ioctl()
421 i = fw_open_isodma(fc, /* tx */1); in fw_ioctl()
426 it = fc->it[i]; in fw_ioctl()
427 err = fwdev_allocbuf(fc, it, &d->bufreq.tx); in fw_ioctl()
449 i = fw_open_isodma(fc, /* tx */0); in fw_ioctl()
454 ir = fc->ir[i]; in fw_ioctl()
455 err = fwdev_allocbuf(fc, ir, &d->bufreq.rx); in fw_ioctl()
465 err = fc->irx_enable(fc, ir->dmach); in fw_ioctl()
501 tinfo = &fc->tcode[fp->mode.hdr.tcode]; in fw_ioctl()
515 fwdev = fw_noderesolve_eui64(fc, &asyreq->req.dst.eui); in fw_ioctl()
517 aprint_error_dev(fc->bdev, in fw_ioctl()
541 if ((err = fw_asyreq(fc, -1, xfer)) != 0) in fw_ioctl()
553 tinfo = &fc->tcode[xfer->recv.hdr.mode.hdr.tcode]; in fw_ioctl()
576 fc->ibr(fc); in fw_ioctl()
580 fwb = fw_bindlookup(fc, bindreq->start.hi, bindreq->start.lo); in fw_ioctl()
585 fw_bindremove(fc, fwb); in fw_ioctl()
611 err = fw_bindadd(fc, fwb); in fw_ioctl()
615 PAGE_SIZE, PAGE_SIZE, 5, fc, (void *)fwb, fw_hand); in fw_ioctl()
626 devinfo->dst = fc->nodeid; in fw_ioctl()
628 devinfo->eui.hi = fc->eui.hi; in fw_ioctl()
629 devinfo->eui.lo = fc->eui.lo; in fw_ioctl()
630 STAILQ_FOREACH(fwdev, &fc->devices, link) { in fw_ioctl()
646 memcpy(data, fc->topology_map, in fw_ioctl()
647 (fc->topology_map->crc_len + 1) * 4); in fw_ioctl()
651 STAILQ_FOREACH(fwdev, &fc->devices, link) in fw_ioctl()
655 if (!FW_EUI64_EQUAL(fc->eui, crom_buf->eui)) { in fw_ioctl()
663 ((uint32_t *)ptr)[i] = ntohl(fc->config_rom[i]); in fw_ioctl()
683 fc->ioctl(dev, cmd, data, flag, td); in fw_ioctl()
751 fwdev_allocbuf(struct firewire_comm *fc, struct fw_xferq *q, in fwdev_allocbuf() argument
766 q->buf = fwdma_malloc_multiseg(fc, sizeof(uint32_t), b->psize, in fwdev_allocbuf()
823 mutex_enter(&d->fc->fc_mtx); in fw_read_async()
828 err = cv_wait_sig(&d->cv, &d->fc->fc_mtx); in fw_read_async()
830 mutex_exit(&d->fc->fc_mtx); in fw_read_async()
839 mutex_exit(&d->fc->fc_mtx); in fw_read_async()
842 if (fc->irx_post != NULL) in fw_read_async()
843 fc->irx_post(fc, fp->mode.ld); in fw_read_async()
845 tinfo = &xfer->fc->tcode[fp->mode.hdr.tcode]; in fw_read_async()
856 mutex_enter(&d->fc->fc_mtx); in fw_read_async()
858 mutex_exit(&d->fc->fc_mtx); in fw_read_async()
873 tinfo = &d->fc->tcode[pkt.mode.hdr.tcode]; in fw_write_async()
890 xfer->fc = d->fc; in fw_write_async()
895 if ((err = fw_asyreq(xfer->fc, -1, xfer))) in fw_write_async()
907 mutex_enter(&xfer->fc->fc_mtx); in fw_write_async()
909 mutex_exit(&xfer->fc->fc_mtx); in fw_write_async()
926 mutex_enter(&xfer->fc->fc_mtx); in fw_hand()
929 mutex_exit(&xfer->fc->fc_mtx); in fw_hand()