Lines Matching refs:vfd

784 vhci_usb_attach(vhci_fd_t *vfd)
786 vhci_softc_t *sc = vfd->softc;
791 port = &sc->sc_port[vfd->port];
814 p[0] = __BIT(vfd->port); /* TODO-bitmap */
873 vhci_usb_detach(vhci_fd_t *vfd)
875 vhci_softc_t *sc = vfd->softc;
880 port = &sc->sc_port[vfd->port];
901 p[0] = __BIT(vfd->port); /* TODO-bitmap */
914 vhci_get_info(vhci_fd_t *vfd, struct vhci_ioc_get_info *args)
916 vhci_softc_t *sc = vfd->softc;
919 port = &sc->sc_port[vfd->port];
922 args->port = vfd->port;
926 args->addr = vfd->addr;
932 vhci_set_port(vhci_fd_t *vfd, struct vhci_ioc_set_port *args)
934 vhci_softc_t *sc = vfd->softc;
939 vfd->port = args->port;
945 vhci_set_addr(vhci_fd_t *vfd, struct vhci_ioc_set_addr *args)
950 vfd->addr = args->addr;
996 vhci_fd_t *vfd;
1008 vfd = kmem_alloc(sizeof(*vfd), KM_SLEEP);
1009 vfd->port = 1;
1010 vfd->addr = 0;
1011 vfd->softc = sc;
1013 return fd_clone(fp, fd, flags, &vhci_fileops, vfd);
1019 vhci_fd_t *vfd = fp->f_data;
1021 KASSERT(vfd != NULL);
1022 vhci_usb_detach(vfd);
1024 kmem_free(vfd, sizeof(*vfd));
1034 vhci_fd_t *vfd = fp->f_data;
1035 vhci_softc_t *sc = vfd->softc;
1047 port = &sc->sc_port[vfd->port];
1048 pktlist = &port->endpoints[vfd->addr].host_to_usb;
1108 vhci_fd_t *vfd = fp->f_data;
1109 vhci_softc_t *sc = vfd->softc;
1121 port = &sc->sc_port[vfd->port];
1122 pktlist = &port->endpoints[vfd->addr].usb_to_host;
1185 vhci_fd_t *vfd = fp->f_data;
1187 KASSERT(vfd != NULL);
1191 return vhci_get_info(vfd, data);
1193 return vhci_set_port(vfd, data);
1195 return vhci_set_addr(vfd, data);
1197 vhci_usb_attach(vfd);
1200 vhci_usb_detach(vfd);