Home | History | Annotate | Download | only in pci

Lines Matching defs:vr

272 	struct vioscsi_req *vr;
303 vr = vioscsi_req_get(sc);
304 if (vr == NULL) {
310 req = &vr->vr_req;
311 slot = vr - sc->sc_reqs;
363 error = bus_dmamap_load(virtio_dmat(vsc), vr->vr_data,
388 nsegs += vr->vr_data->dm_nsegs;
392 bus_dmamap_unload(virtio_dmat(vsc), vr->vr_data);
399 vr->vr_xs = xs;
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);
434 if (vr->vr_xs != xs)
439 if (vr->vr_xs == xs) {
452 struct vioscsi_req *vr, struct virtqueue *vq, int slot)
454 struct scsipi_xfer *xs = vr->vr_xs;
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,
471 xs->status = vr->vr_res.status;
472 xs->resid = virtio_rw32(vsc, vr->vr_res.residual);
474 switch (vr->vr_res.response) {
477 virtio_rw32(vsc, vr->vr_res.sense_len));
478 memcpy(&xs->sense, vr->vr_res.sense, sense_len);
485 DPRINTF(("%s: stuffup: %d\n", __func__, vr->vr_res.response));
494 bus_dmamap_unload(virtio_dmat(vsc), vr->vr_data);
495 vr->vr_xs = NULL;
557 struct vioscsi_req *vr = NULL;
567 vr = &sc->sc_reqs[slot];
569 DPRINTF(("%s: %p, %d\n", __func__, vr, slot));
574 return vr;
584 struct vioscsi_req *vr;
610 vr = &sc->sc_reqs[slot];
615 vr->vr_control);
624 MAXPHYS, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vr->vr_data);
632 r = bus_dmamap_load(virtio_dmat(vsc), vr->vr_control,
633 vr, offsetof(struct vioscsi_req, vr_xs), NULL,
647 vr = &sc->sc_reqs[slot];
649 if (vr->vr_control) {
651 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_control);
652 vr->vr_control = NULL;
655 if (vr->vr_data) {
656 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_data);
657 vr->vr_data = NULL;
671 struct vioscsi_req *vr;
680 vr = &sc->sc_reqs[slot];
682 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_control);
683 bus_dmamap_destroy(virtio_dmat(vsc), vr->vr_data);