Lines Matching refs:fc
86 struct firewire_comm *fc; member
95 fwdev_allocbuf(struct firewire_comm *fc, struct fw_xferq *q, in fwdev_allocbuf() argument
107 q->buf = fwdma_malloc_multiseg(fc, sizeof(uint32_t), in fwdev_allocbuf()
170 FW_GLOCK(sc->fc); in fw_open()
172 FW_GUNLOCK(sc->fc); in fw_open()
177 FW_GUNLOCK(sc->fc); in fw_open()
190 d->fc = sc->fc; in fw_open()
200 struct firewire_comm *fc; in fw_close() local
210 fc = d->fc; in fw_close()
215 fw_bindremove(fc, fwb); in fw_close()
227 fc->irx_disable(fc, ir->dmach); in fw_close()
252 fc->itx_disable(fc, it->dmach); in fw_close()
275 FW_GLOCK(d->fc); in fw_read_async()
277 err = msleep(&d->rq, FW_GMTX(d->fc), FWPRI, "fwra", 0); in fw_read_async()
280 FW_GUNLOCK(d->fc); in fw_read_async()
286 FW_GUNLOCK(xfer->fc); in fw_read_async()
290 if (fc->irx_post != NULL) in fw_read_async()
291 fc->irx_post(fc, fp->mode.ld); in fw_read_async()
293 tinfo = &xfer->fc->tcode[fp->mode.hdr.tcode]; in fw_read_async()
304 FW_GLOCK(xfer->fc); in fw_read_async()
306 FW_GUNLOCK(xfer->fc); in fw_read_async()
318 struct firewire_comm *fc; in fw_read() local
326 fc = d->fc; in fw_read()
335 FW_GLOCK(fc); in fw_read()
352 err = msleep(ir, FW_GMTX(fc), FWPRI, "fw_read", hz); in fw_read()
358 FW_GUNLOCK(fc); in fw_read()
362 FW_GUNLOCK(fc); in fw_read()
365 if (fc->irx_post != NULL) in fw_read()
366 fc->irx_post(fc, fp->mode.ld); in fw_read()
378 fc->irx_enable(fc, ir->dmach); in fw_read()
383 FW_GLOCK(fc); in fw_read()
401 tinfo = &d->fc->tcode[pkt.mode.hdr.tcode]; in fw_write_async()
418 xfer->fc = d->fc; in fw_write_async()
423 if ((err = fw_asyreq(xfer->fc, -1, xfer))) in fw_write_async()
435 FW_GLOCK(xfer->fc); in fw_write_async()
437 FW_GUNLOCK(xfer->fc); in fw_write_async()
453 struct firewire_comm *fc; in fw_write() local
460 fc = d->fc; in fw_write()
469 FW_GLOCK(fc); in fw_write()
481 err = fc->itx_enable(fc, it->dmach); in fw_write()
485 err = msleep(it, FW_GMTX(fc), FWPRI, "fw_write", hz); in fw_write()
494 FW_GUNLOCK(fc); in fw_write()
506 err = fc->itx_enable(fc, it->dmach); in fw_write()
510 FW_GLOCK(fc); in fw_write()
516 FW_GUNLOCK(fc); in fw_write()
528 FW_GLOCK(xfer->fc); in fw_hand()
530 FW_GUNLOCK(xfer->fc); in fw_hand()
540 struct firewire_comm *fc; in fw_ioctl() local
565 fc = d->fc; in fw_ioctl()
572 i = fw_open_isodma(fc, /* tx */1); in fw_ioctl()
577 it = fc->it[i]; in fw_ioctl()
578 err = fwdev_allocbuf(fc, it, &d->bufreq.tx); in fw_ioctl()
598 i = fw_open_isodma(fc, /* tx */0); in fw_ioctl()
603 ir = fc->ir[i]; in fw_ioctl()
604 err = fwdev_allocbuf(fc, ir, &d->bufreq.rx); in fw_ioctl()
614 err = fc->irx_enable(fc, ir->dmach); in fw_ioctl()
646 tinfo = &fc->tcode[fp->mode.hdr.tcode]; in fw_ioctl()
659 fwdev = fw_noderesolve_eui64(fc, in fw_ioctl()
662 device_printf(fc->bdev, in fw_ioctl()
684 if ((err = fw_asyreq(fc, -1, xfer)) != 0) in fw_ioctl()
696 tinfo = &fc->tcode[xfer->recv.hdr.mode.hdr.tcode]; in fw_ioctl()
717 fc->ibr(fc); in fw_ioctl()
720 fwb = fw_bindlookup(fc, in fw_ioctl()
726 fw_bindremove(fc, fwb); in fw_ioctl()
746 err = fw_bindadd(fc, fwb); in fw_ioctl()
751 fc, fwb, fw_hand); in fw_ioctl()
759 devinfo->dst = fc->nodeid; in fw_ioctl()
761 devinfo->eui.hi = fc->eui.hi; in fw_ioctl()
762 devinfo->eui.lo = fc->eui.lo; in fw_ioctl()
763 STAILQ_FOREACH(fwdev, &fc->devices, link) { in fw_ioctl()
778 bcopy(fc->topology_map, data, in fw_ioctl()
779 (fc->topology_map->crc_len + 1) * 4); in fw_ioctl()
782 STAILQ_FOREACH(fwdev, &fc->devices, link) in fw_ioctl()
786 if (!FW_EUI64_EQUAL(fc->eui, crom_buf->eui)) { in fw_ioctl()
795 = ntohl(fc->config_rom[i]); in fw_ioctl()
814 fc->ioctl(dev, cmd, data, flag, td); in fw_ioctl()
883 unit = device_get_unit(sc->fc->bdev); in fwdev_makedev()