Lines Matching defs:vsc
87 struct virtio_softc *vsc = sc->sc_virtio;
101 bus_dmamap_sync(virtio_dmat(vsc), sc->sc_dmamap, 0, VIORND_BUFSIZE,
103 if (virtio_enqueue_prep(vsc, vq, &slot)) {
106 if (virtio_enqueue_reserve(vsc, vq, slot, 1)) {
109 virtio_enqueue(vsc, vq, slot, sc->sc_dmamap, 0);
110 virtio_enqueue_commit(vsc, vq, slot, 1);
131 struct virtio_softc *vsc = device_private(parent);
136 if (virtio_child(vsc) != NULL)
140 sc->sc_virtio = vsc;
144 error = bus_dmamem_alloc(virtio_dmat(vsc),
153 error = bus_dmamem_map(virtio_dmat(vsc), segs, nsegs, VIORND_BUFSIZE,
160 error = bus_dmamap_create(virtio_dmat(vsc), VIORND_BUFSIZE, 1,
170 error = bus_dmamap_load(virtio_dmat(vsc), sc->sc_dmamap,
179 virtio_child_attach_start(vsc, self, IPL_NET,
182 virtio_init_vq_vqdone(vsc, &sc->sc_vq, 0, viornd_vq_done);
184 error = virtio_alloc_vq(vsc, &sc->sc_vq, VIORND_BUFSIZE, 1,
193 error = virtio_child_attach_finish(vsc, &sc->sc_vq, 1,
196 virtio_free_vq(vsc, &sc->sc_vq);
208 bus_dmamap_unload(virtio_dmat(vsc), sc->sc_dmamap);
210 bus_dmamap_destroy(virtio_dmat(vsc), sc->sc_dmamap);
212 bus_dmamem_unmap(virtio_dmat(vsc), sc->sc_buf, VIORND_BUFSIZE);
214 bus_dmamem_free(virtio_dmat(vsc), segs, nsegs);
216 virtio_child_attach_failed(vsc);
223 struct virtio_softc *vsc = vq->vq_owner;
224 struct viornd_softc *sc = device_private(virtio_child(vsc));
229 if (virtio_dequeue(vsc, vq, &slot, &len) != 0) {
236 bus_dmamap_sync(virtio_dmat(vsc), sc->sc_dmamap, 0, VIORND_BUFSIZE,
252 virtio_dequeue_commit(vsc, vq, slot);