Lines Matching defs:vsc

106 	struct virtio_softc *vsc = (struct virtio_softc *)parent;
112 if (vsc->sc_child != NULL) {
116 vsc->sc_child = &sc->sc_dev;
117 vsc->sc_ipl = IPL_BIO;
121 vsc->sc_vqs = sc->sc_vqs;
122 vsc->sc_nvqs = nitems(sc->sc_vqs);
124 if (virtio_negotiate_features(vsc, NULL) != 0)
126 uint32_t cmd_per_lun = virtio_read_device_config_4(vsc,
128 uint32_t seg_max = virtio_read_device_config_4(vsc,
130 uint16_t max_target = virtio_read_device_config_2(vsc,
139 rv = virtio_alloc_vq(vsc, &sc->sc_vqs[i], i, ALLOC_SEGS,
155 int nreqs = vioscsi_alloc_reqs(sc, vsc, qsize);
171 if (virtio_attach_finish(vsc, va) != 0)
177 vsc->sc_child = VIRTIO_CHILD_ERROR;
185 struct virtio_softc *vsc = (struct virtio_softc *)sc->sc_dev.dv_parent;
223 if (bus_dmamap_load(vsc->sc_dmat, vr->vr_data,
240 bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
244 bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
249 bus_dmamap_sync(vsc->sc_dmat, vr->vr_data, 0, xs->datalen,
266 virtio_enqueue_commit(vsc, vq, slot, 1);
272 virtio_poll_intr(vsc);
297 vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc,
304 bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
308 bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
313 bus_dmamap_sync(vsc->sc_dmat, vr->vr_data, 0, xs->datalen,
315 bus_dmamap_unload(vsc->sc_dmat, vr->vr_data);
343 struct virtio_softc *vsc = vq->vq_owner;
344 struct vioscsi_softc *sc = (struct vioscsi_softc *)vsc->sc_child;
354 r = virtio_dequeue(vsc, vq, &slot, NULL);
362 vioscsi_req_done(sc, vsc, vr);
419 vioscsi_alloc_reqs(struct vioscsi_softc *sc, struct virtio_softc *vsc,
435 r = bus_dmamem_alloc(vsc->sc_dmat, allocsize, 0, 0,
442 r = bus_dmamem_map(vsc->sc_dmat, &sc->sc_reqs_segs[0], 1,
446 bus_dmamem_free(vsc->sc_dmat, &sc->sc_reqs_segs[0], 1);
486 r = bus_dmamap_create(vsc->sc_dmat,
494 r = bus_dmamap_create(vsc->sc_dmat, MAXPHYS, SEG_MAX,
500 r = bus_dmamap_load(vsc->sc_dmat, vr->vr_control,