aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-05-21 03:52:16 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-05-21 03:52:16 -0400
commite1b73cba13a0cc68dd4f746eced15bd6bb24cda4 (patch)
treeb1c9e10730724024a700031ad56c20419dabb500 /include/linux/virtio.h
parent98304ad186296dc1e655399e28d5973c21db6a73 (diff)
parentc7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff)
Merge tag 'v3.10-rc2' into drm-intel-next-queued
Backmerge Linux 3.10-rc2 since the various (rather trivial) conflicts grew a bit out of hand. intel_dp.c has the only real functional conflict since the logic changed while dev_priv->edp.bpp was moved around. Also squash in a whitespace fixup from Ben Widawsky for i915_gem_gtt.c, git seems to do something pretty strange in there (which I don't fully understand tbh). Conflicts: drivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_dp.c Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index ff6714e6d0f5..9ff8645b7e0b 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -8,6 +8,7 @@
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/mod_devicetable.h> 9#include <linux/mod_devicetable.h>
10#include <linux/gfp.h> 10#include <linux/gfp.h>
11#include <linux/vringh.h>
11 12
12/** 13/**
13 * virtqueue - a queue to register buffers for sending or receiving. 14 * virtqueue - a queue to register buffers for sending or receiving.
@@ -40,6 +41,23 @@ int virtqueue_add_buf(struct virtqueue *vq,
40 void *data, 41 void *data,
41 gfp_t gfp); 42 gfp_t gfp);
42 43
44int virtqueue_add_outbuf(struct virtqueue *vq,
45 struct scatterlist sg[], unsigned int num,
46 void *data,
47 gfp_t gfp);
48
49int virtqueue_add_inbuf(struct virtqueue *vq,
50 struct scatterlist sg[], unsigned int num,
51 void *data,
52 gfp_t gfp);
53
54int virtqueue_add_sgs(struct virtqueue *vq,
55 struct scatterlist *sgs[],
56 unsigned int out_sgs,
57 unsigned int in_sgs,
58 void *data,
59 gfp_t gfp);
60
43void virtqueue_kick(struct virtqueue *vq); 61void virtqueue_kick(struct virtqueue *vq);
44 62
45bool virtqueue_kick_prepare(struct virtqueue *vq); 63bool virtqueue_kick_prepare(struct virtqueue *vq);
@@ -58,18 +76,13 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq);
58 76
59unsigned int virtqueue_get_vring_size(struct virtqueue *vq); 77unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
60 78
61/* FIXME: Obsolete accessor, but required for virtio_net merge. */
62static inline unsigned int virtqueue_get_queue_index(struct virtqueue *vq)
63{
64 return vq->index;
65}
66
67/** 79/**
68 * virtio_device - representation of a device using virtio 80 * virtio_device - representation of a device using virtio
69 * @index: unique position on the virtio bus 81 * @index: unique position on the virtio bus
70 * @dev: underlying device. 82 * @dev: underlying device.
71 * @id: the device type identification (used to match it with a driver). 83 * @id: the device type identification (used to match it with a driver).
72 * @config: the configuration ops for this device. 84 * @config: the configuration ops for this device.
85 * @vringh_config: configuration ops for host vrings.
73 * @vqs: the list of virtqueues for this device. 86 * @vqs: the list of virtqueues for this device.
74 * @features: the features supported by both driver and device. 87 * @features: the features supported by both driver and device.
75 * @priv: private pointer for the driver's use. 88 * @priv: private pointer for the driver's use.
@@ -79,6 +92,7 @@ struct virtio_device {
79 struct device dev; 92 struct device dev;
80 struct virtio_device_id id; 93 struct virtio_device_id id;
81 const struct virtio_config_ops *config; 94 const struct virtio_config_ops *config;
95 const struct vringh_config_ops *vringh_config;
82 struct list_head vqs; 96 struct list_head vqs;
83 /* Note that this is a Linux set_bit-style bitmap. */ 97 /* Note that this is a Linux set_bit-style bitmap. */
84 unsigned long features[1]; 98 unsigned long features[1];