Home | History | Annotate | Download | only in pci

Lines Matching defs:vsc

117 	struct virtio_softc *vsc = device_private(parent);
123 if (virtio_child(vsc) != NULL) {
131 virtio_child_attach_start(vsc, self, ipl,
136 uint32_t cmd_per_lun = virtio_read_device_config_4(vsc,
139 uint32_t seg_max = virtio_read_device_config_4(vsc,
142 uint16_t max_target = virtio_read_device_config_2(vsc,
145 uint32_t max_lun = virtio_read_device_config_4(vsc,
151 virtio_init_vq_vqdone(vsc, &sc->sc_vqs[i], i,
153 rv = virtio_alloc_vq(vsc, &sc->sc_vqs[i], MAXPHYS,
167 if (vioscsi_alloc_reqs(sc, vsc, qsize))
175 if (virtio_child_attach_finish(vsc, sc->sc_vqs,
209 vioscsi_free_reqs(sc, vsc);
212 virtio_free_vq(vsc, &sc->sc_vqs[i]);
215 virtio_child_attach_failed(vsc);
222 struct virtio_softc *vsc = device_private(device_parent(sc->sc_dev));
236 virtio_reset(vsc);
240 virtio_free_vq(vsc, &sc->sc_vqs[i]);
243 vioscsi_free_reqs(sc, vsc);
245 virtio_child_detach(vsc);
269 struct virtio_softc *vsc = device_private(device_parent(sc->sc_dev));
352 req->id = virtio_rw64(vsc, slot);
363 error = bus_dmamap_load(virtio_dmat(vsc), vr->vr_data,
381 virtio_enqueue_abort(vsc, vq, slot);
390 error = virtio_enqueue_reserve(vsc, vq, slot, nsegs);
392 bus_dmamap_unload(virtio_dmat(vsc), vr->vr_data);
401 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_control,
405 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_control,
410 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_data, 0, xs->datalen,
413 virtio_enqueue_p(vsc, vq, slot, vr->vr_control,
417 virtio_enqueue(vsc, vq, slot, vr->vr_data, 1);
418 virtio_enqueue_p(vsc, vq, slot, vr->vr_control,
422 virtio_enqueue(vsc, vq, slot, vr->vr_data, 0);
424 virtio_enqueue_commit(vsc, vq, slot, 1);
433 virtio_intrhand(vsc);
451 vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc,
459 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_control,
463 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_control,
468 bus_dmamap_sync(virtio_dmat(vsc), vr->vr_data, 0, xs->datalen,
472 xs->resid = virtio_rw32(vsc, vr->vr_res.residual);
477 virtio_rw32(vsc, vr->vr_res.sense_len));
494 bus_dmamap_unload(virtio_dmat(vsc), vr->vr_data);
497 virtio_dequeue_commit(vsc, vq, slot);
523 struct virtio_softc *vsc = vq->vq_owner;
524 struct vioscsi_softc *sc = device_private(virtio_child(vsc));
534 r = virtio_dequeue(vsc, vq, &slot, NULL);
540 vioscsi_req_done(sc, vsc, &sc->sc_reqs[slot], vq, slot);
555 struct virtio_softc *vsc = device_private(device_parent(sc->sc_dev));
562 if ((r = virtio_enqueue_prep(vsc, vq, &slot)) != 0) {
578 vioscsi_alloc_reqs(struct vioscsi_softc *sc, struct virtio_softc *vsc,
587 r = bus_dmamem_alloc(virtio_dmat(vsc), allocsize, 0, 0,
595 r = bus_dmamem_map(virtio_dmat(vsc), &sc->sc_reqs_segs[0], 1,
600 bus_dmamem_free(virtio_dmat(vsc), &sc->sc_reqs_segs[0], 1);
612 r = bus_dmamap_create(virtio_dmat(vsc),
623 r = bus_dmamap_create(virtio_dmat(vsc), MAXPHYS, sc->sc_seg_max,
632 r = bus_dmamap_load(virtio_dmat(vsc), vr->vr_control,
651 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_control);
656 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_data);
661 bus_dmamem_unmap(virtio_dmat(vsc), vaddr, allocsize);
662 bus_dmamem_free(virtio_dmat(vsc), &sc->sc_reqs_segs[0], 1);
668 vioscsi_free_reqs(struct vioscsi_softc *sc, struct virtio_softc *vsc)
682 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_control);
683 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_data);
686 bus_dmamem_unmap(virtio_dmat(vsc), sc->sc_reqs,
688 bus_dmamem_free(virtio_dmat(vsc), &sc->sc_reqs_segs[0], 1);