diff options
Diffstat (limited to 'include/linux/virtio_config.h')
| -rw-r--r-- | include/linux/virtio_config.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 32baf8e26735..987b6491b946 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -12,6 +12,11 @@ struct irq_affinity; | |||
| 12 | 12 | ||
| 13 | /** | 13 | /** |
| 14 | * virtio_config_ops - operations for configuring a virtio device | 14 | * virtio_config_ops - operations for configuring a virtio device |
| 15 | * Note: Do not assume that a transport implements all of the operations | ||
| 16 | * getting/setting a value as a simple read/write! Generally speaking, | ||
| 17 | * any of @get/@set, @get_status/@set_status, or @get_features/ | ||
| 18 | * @finalize_features are NOT safe to be called from an atomic | ||
| 19 | * context. | ||
| 15 | * @get: read the value of a configuration field | 20 | * @get: read the value of a configuration field |
| 16 | * vdev: the virtio_device | 21 | * vdev: the virtio_device |
| 17 | * offset: the offset of the configuration field | 22 | * offset: the offset of the configuration field |
| @@ -22,7 +27,7 @@ struct irq_affinity; | |||
| 22 | * offset: the offset of the configuration field | 27 | * offset: the offset of the configuration field |
| 23 | * buf: the buffer to read the field value from. | 28 | * buf: the buffer to read the field value from. |
| 24 | * len: the length of the buffer | 29 | * len: the length of the buffer |
| 25 | * @generation: config generation counter | 30 | * @generation: config generation counter (optional) |
| 26 | * vdev: the virtio_device | 31 | * vdev: the virtio_device |
| 27 | * Returns the config generation counter | 32 | * Returns the config generation counter |
| 28 | * @get_status: read the status byte | 33 | * @get_status: read the status byte |
| @@ -48,17 +53,17 @@ struct irq_affinity; | |||
| 48 | * @del_vqs: free virtqueues found by find_vqs(). | 53 | * @del_vqs: free virtqueues found by find_vqs(). |
| 49 | * @get_features: get the array of feature bits for this device. | 54 | * @get_features: get the array of feature bits for this device. |
| 50 | * vdev: the virtio_device | 55 | * vdev: the virtio_device |
| 51 | * Returns the first 32 feature bits (all we currently need). | 56 | * Returns the first 64 feature bits (all we currently need). |
| 52 | * @finalize_features: confirm what device features we'll be using. | 57 | * @finalize_features: confirm what device features we'll be using. |
| 53 | * vdev: the virtio_device | 58 | * vdev: the virtio_device |
| 54 | * This gives the final feature bits for the device: it can change | 59 | * This gives the final feature bits for the device: it can change |
| 55 | * the dev->feature bits if it wants. | 60 | * the dev->feature bits if it wants. |
| 56 | * Returns 0 on success or error status | 61 | * Returns 0 on success or error status |
| 57 | * @bus_name: return the bus name associated with the device | 62 | * @bus_name: return the bus name associated with the device (optional) |
| 58 | * vdev: the virtio_device | 63 | * vdev: the virtio_device |
| 59 | * This returns a pointer to the bus name a la pci_name from which | 64 | * This returns a pointer to the bus name a la pci_name from which |
| 60 | * the caller can then copy. | 65 | * the caller can then copy. |
| 61 | * @set_vq_affinity: set the affinity for a virtqueue. | 66 | * @set_vq_affinity: set the affinity for a virtqueue (optional). |
| 62 | * @get_vq_affinity: get the affinity for a virtqueue (optional). | 67 | * @get_vq_affinity: get the affinity for a virtqueue (optional). |
| 63 | */ | 68 | */ |
| 64 | typedef void vq_callback_t(struct virtqueue *); | 69 | typedef void vq_callback_t(struct virtqueue *); |
