Lines Matching refs:vdev

46 	struct virtio_device vdev;
57 #define to_lgdev(vd) container_of(vd, struct lguest_device, vdev)
97 static u32 lg_get_features(struct virtio_device *vdev)
101 struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
116 static void status_notify(struct virtio_device *vdev)
118 unsigned long offset = (void *)to_lgdev(vdev)->desc - lguest_devices;
125 * supported by the driver into the vdev->features array. Once that's all
129 static void lg_finalize_features(struct virtio_device *vdev)
132 struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
137 vring_transport_features(vdev);
140 * The vdev->feature array is a Linux bitmask: this isn't the same as a
145 bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
147 if (test_bit(i, vdev->features))
152 status_notify(vdev);
156 static void lg_get(struct virtio_device *vdev, unsigned int offset,
159 struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
167 static void lg_set(struct virtio_device *vdev, unsigned int offset,
170 struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
181 static u8 lg_get_status(struct virtio_device *vdev)
183 return to_lgdev(vdev)->desc->status;
186 static void lg_set_status(struct virtio_device *vdev, u8 status)
189 to_lgdev(vdev)->desc->status = status;
193 status_notify(vdev);
196 static void lg_reset(struct virtio_device *vdev)
199 to_lgdev(vdev)->desc->status = 0;
200 status_notify(vdev);
257 static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
262 struct lguest_device *ldev = to_lgdev(vdev);
303 vq = vring_new_virtqueue(index, lvq->config.num, LGUEST_VRING_ALIGN, vdev,
324 dev_name(&vdev->dev), vq);
362 static void lg_del_vqs(struct virtio_device *vdev)
366 list_for_each_entry_safe(vq, n, &vdev->vqs, list)
370 static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs,
375 struct lguest_device *ldev = to_lgdev(vdev);
383 vqs[i] = lg_find_vq(vdev, i, callbacks[i], names[i]);
390 lg_del_vqs(vdev);
394 static const char *lg_bus_name(struct virtio_device *vdev)
445 ldev->vdev.dev.parent = lguest_root;
451 ldev->vdev.id.device = d->type;
456 ldev->vdev.config = &lguest_config_ops;
465 if (register_virtio_device(&ldev->vdev) != 0) {