Lines Matching refs:pptfd

80 	int pptfd;  member
118 if (ioctl(sc->pptfd, PPT_CFG_READ, &pi) != 0) { in passthru_read_config()
134 (void) ioctl(sc->pptfd, PPT_CFG_WRITE, &pi); in passthru_write_config()
145 if (ioctl(sc->pptfd, PPT_BAR_QUERY, &pb) != 0) { in passthru_get_bar()
172 int pptfd; in passthru_dev_open() local
174 if ((pptfd = open(path, O_RDWR)) < 0) { in passthru_dev_open()
179 *pptfdp = pptfd; in passthru_dev_open()
485 (void) vm_setup_pptdev_msix(ctx, sc->pptfd, in msix_table_write()
524 PROT_READ | PROT_WRITE, MAP_SHARED, sc->pptfd, 0); in init_msix_table()
526 warn("Failed to map MSI-X table BAR on %d", sc->pptfd); in init_msix_table()
577 sc->pptfd, i, base, size); in cfginitbar()
641 warnx("failed to initialize MSI for PCI %d", sc->pptfd); in cfginit()
646 warnx("failed to initialize BARs for PCI %d", sc->pptfd); in cfginit()
661 sc->pptfd); in cfginit()
778 int error, memflags, pptfd; in passthru_init() local
783 pptfd = -1; in passthru_init()
794 if (path == NULL || passthru_dev_open(path, &pptfd) != 0) { in passthru_init()
799 if (vm_assign_pptdev(ctx, pptfd) != 0) { in passthru_init()
800 warnx("PCI device at %d is not using the ppt driver", pptfd); in passthru_init()
808 sc->pptfd = pptfd; in passthru_init()
810 if ((error = vm_get_pptdev_limits(ctx, pptfd, &sc->msi_limit, in passthru_init()
839 if (pptfd != -1) in passthru_init()
840 vm_unassign_pptdev(ctx, pptfd); in passthru_init()
942 error = vm_setup_pptdev_msi(ctx, sc->pptfd, in passthru_cfgwrite_default()
956 sc->pptfd, i, in passthru_cfgwrite_default()
965 error = vm_disable_pptdev_msix(ctx, sc->pptfd); in passthru_cfgwrite_default()
1036 (void) ioctl(sc->pptfd, PPT_BAR_WRITE, &pbi); in passthru_write()
1056 if (ioctl(sc->pptfd, PPT_BAR_READ, &pbi) == 0) { in passthru_read()
1078 if (vm_unmap_pptdev_mmio(ctx, sc->pptfd, address, in passthru_msix_addr()
1082 if (vm_map_pptdev_mmio(ctx, sc->pptfd, address, in passthru_msix_addr()
1094 if (vm_unmap_pptdev_mmio(ctx, sc->pptfd, address, in passthru_msix_addr()
1098 if (vm_map_pptdev_mmio(ctx, sc->pptfd, address, in passthru_msix_addr()
1114 if (vm_unmap_pptdev_mmio(ctx, sc->pptfd, address, in passthru_mmio_addr()
1118 if (vm_map_pptdev_mmio(ctx, sc->pptfd, address, in passthru_mmio_addr()