Lines Matching refs:vdev
76 * @vdev: Associated virtio device
103 struct virtio_device *vdev;
142 struct cfv_info *cfv = vq_tx->vdev->priv;
162 struct cfv_info *cfv = vq_tx->vdev->priv;
350 static void cfv_recv(struct virtio_device *vdev, struct vringh *vr_rx)
352 struct cfv_info *cfv = vdev->priv;
362 dma_free_coherent(cfv->vdev->dev.parent->parent,
396 cfv->vdev->dev.parent->parent,
647 static int cfv_probe(struct virtio_device *vdev)
663 cfv->vdev = vdev;
670 if (!vdev->vringh_config || !vdev->vringh_config->find_vrhs)
673 err = vdev->vringh_config->find_vrhs(vdev, 1, &cfv->vr_rx, &vrh_cbs);
678 err = virtio_find_vqs(vdev, 1, &cfv->vq_tx, &vq_cbs, &names, NULL);
683 if (vdev->config->get) {
684 virtio_cread(vdev, struct virtio_caif_transf_config, headroom,
686 virtio_cread(vdev, struct virtio_caif_transf_config, headroom,
688 virtio_cread(vdev, struct virtio_caif_transf_config, tailroom,
690 virtio_cread(vdev, struct virtio_caif_transf_config, tailroom,
692 virtio_cread(vdev, struct virtio_caif_transf_config, mtu,
694 virtio_cread(vdev, struct virtio_caif_transf_config, mtu,
712 vdev->priv = cfv;
733 dev_err(&vdev->dev, "Unable to register netdev (%d)\n", err);
737 virtio_device_ready(vdev);
748 vdev->vringh_config->del_vrhs(cfv->vdev);
749 if (cfv->vdev)
750 vdev->config->del_vqs(cfv->vdev);
755 static void cfv_remove(struct virtio_device *vdev)
757 struct cfv_info *cfv = vdev->priv;
767 vdev->config->reset(vdev);
768 vdev->vringh_config->del_vrhs(cfv->vdev);
770 vdev->config->del_vqs(cfv->vdev);