Lines Matching refs:fc
88 struct firewire_comm *fc; member
97 fwdev_allocbuf(struct firewire_comm *fc, struct fw_xferq *q, in fwdev_allocbuf() argument
109 q->buf = fwdma_malloc_multiseg(fc, sizeof(uint32_t), in fwdev_allocbuf()
172 FW_GLOCK(sc->fc); in fw_open()
174 FW_GUNLOCK(sc->fc); in fw_open()
179 FW_GUNLOCK(sc->fc); in fw_open()
192 d->fc = sc->fc; in fw_open()
202 struct firewire_comm *fc; in fw_close() local
212 fc = d->fc; in fw_close()
217 fw_bindremove(fc, fwb); in fw_close()
229 fc->irx_disable(fc, ir->dmach); in fw_close()
254 fc->itx_disable(fc, it->dmach); in fw_close()
277 FW_GLOCK(d->fc); in fw_read_async()
279 err = msleep(&d->rq, FW_GMTX(d->fc), FWPRI, "fwra", 0); in fw_read_async()
282 FW_GUNLOCK(d->fc); in fw_read_async()
288 FW_GUNLOCK(xfer->fc); in fw_read_async()
292 if (fc->irx_post != NULL) in fw_read_async()
293 fc->irx_post(fc, fp->mode.ld); in fw_read_async()
295 tinfo = &xfer->fc->tcode[fp->mode.hdr.tcode]; in fw_read_async()
306 FW_GLOCK(xfer->fc); in fw_read_async()
308 FW_GUNLOCK(xfer->fc); in fw_read_async()
320 struct firewire_comm *fc; in fw_read() local
328 fc = d->fc; in fw_read()
337 FW_GLOCK(fc); in fw_read()
354 err = msleep(ir, FW_GMTX(fc), FWPRI, "fw_read", hz); in fw_read()
360 FW_GUNLOCK(fc); in fw_read()
364 FW_GUNLOCK(fc); in fw_read()
367 if (fc->irx_post != NULL) in fw_read()
368 fc->irx_post(fc, fp->mode.ld); in fw_read()
380 fc->irx_enable(fc, ir->dmach); in fw_read()
385 FW_GLOCK(fc); in fw_read()
403 tinfo = &d->fc->tcode[pkt.mode.hdr.tcode]; in fw_write_async()
420 xfer->fc = d->fc; in fw_write_async()
425 if ((err = fw_asyreq(xfer->fc, -1, xfer))) in fw_write_async()
437 FW_GLOCK(xfer->fc); in fw_write_async()
439 FW_GUNLOCK(xfer->fc); in fw_write_async()
455 struct firewire_comm *fc; in fw_write() local
462 fc = d->fc; in fw_write()
471 FW_GLOCK(fc); in fw_write()
483 err = fc->itx_enable(fc, it->dmach); in fw_write()
487 err = msleep(it, FW_GMTX(fc), FWPRI, "fw_write", hz); in fw_write()
496 FW_GUNLOCK(fc); in fw_write()
508 err = fc->itx_enable(fc, it->dmach); in fw_write()
512 FW_GLOCK(fc); in fw_write()
518 FW_GUNLOCK(fc); in fw_write()
530 FW_GLOCK(xfer->fc); in fw_hand()
532 FW_GUNLOCK(xfer->fc); in fw_hand()
542 struct firewire_comm *fc; in fw_ioctl() local
567 fc = d->fc; in fw_ioctl()
574 i = fw_open_isodma(fc, /* tx */1); in fw_ioctl()
579 it = fc->it[i]; in fw_ioctl()
580 err = fwdev_allocbuf(fc, it, &d->bufreq.tx); in fw_ioctl()
600 i = fw_open_isodma(fc, /* tx */0); in fw_ioctl()
605 ir = fc->ir[i]; in fw_ioctl()
606 err = fwdev_allocbuf(fc, ir, &d->bufreq.rx); in fw_ioctl()
616 err = fc->irx_enable(fc, ir->dmach); in fw_ioctl()
648 tinfo = &fc->tcode[fp->mode.hdr.tcode]; in fw_ioctl()
661 fwdev = fw_noderesolve_eui64(fc, in fw_ioctl()
664 device_printf(fc->bdev, in fw_ioctl()
686 if ((err = fw_asyreq(fc, -1, xfer)) != 0) in fw_ioctl()
698 tinfo = &fc->tcode[xfer->recv.hdr.mode.hdr.tcode]; in fw_ioctl()
719 fc->ibr(fc); in fw_ioctl()
722 fwb = fw_bindlookup(fc, in fw_ioctl()
728 fw_bindremove(fc, fwb); in fw_ioctl()
748 err = fw_bindadd(fc, fwb); in fw_ioctl()
753 fc, fwb, fw_hand); in fw_ioctl()
761 devinfo->dst = fc->nodeid; in fw_ioctl()
763 devinfo->eui.hi = fc->eui.hi; in fw_ioctl()
764 devinfo->eui.lo = fc->eui.lo; in fw_ioctl()
765 STAILQ_FOREACH(fwdev, &fc->devices, link) { in fw_ioctl()
780 bcopy(fc->topology_map, data, in fw_ioctl()
781 (fc->topology_map->crc_len + 1) * 4); in fw_ioctl()
784 STAILQ_FOREACH(fwdev, &fc->devices, link) in fw_ioctl()
788 if (!FW_EUI64_EQUAL(fc->eui, crom_buf->eui)) { in fw_ioctl()
797 = ntohl(fc->config_rom[i]); in fw_ioctl()
816 fc->ioctl(dev, cmd, data, flag, td); in fw_ioctl()
885 unit = device_get_unit(sc->fc->bdev); in fwdev_makedev()