Lines Matching full:device
6 #include <linux/device.h>
49 * @last_avail_counter: last driver ring wrap counter observed by device
50 * @last_avail_idx: device available index
51 * @last_used_counter: device ring wrap counter
71 * struct vdpa_device - representation of a vDPA device
72 * @dev: underlying device
73 * @dma_dev: the actual device that is performing DMA
77 * @config: the configuration ops for this device.
79 * @index: device index
83 * @use_va: indicate whether virtual address must be used by this device
85 * @mdev: management device pointer; caller must setup when registering device as part
89 struct device dev;
90 struct device *dma_dev;
104 * struct vdpa_iova_range - the IOVA range support by the device
124 * struct vdpa_map_file - file area for device memory mapping
134 * struct vdpa_config_ops - operations for configuring a vDPA device.
135 * Note: vDPA device drivers are required to implement all of the
140 * @vdev: vdpa device
144 * @device_area: address of device area
147 * @vdev: vdpa device
151 * @vdev: vdpa device
155 * @vdev: vdpa device
163 * @vdev: vdpa device
167 * @vdev: vdpa device
171 * @vdev: vdpa device
175 * @vdev: vdpa device
180 * @vdev: vdpa device
183 * @get_vendor_vq_stats: Get the vendor statistics of a device.
184 * @vdev: vdpa device
190 * @vdev: vdpa device
195 * @vdev: vdpa device
200 * @vdev: vdpa device
204 * for the device
205 * @vdev: vdpa device
209 * @vdev: vdpa device
214 * @vdev: vdpa device
222 * @get_device_features: Get virtio features supported by the device
223 * @vdev: vdpa device
225 * device
228 * device.
230 * @vdev: vdpa device
234 * @vdev: vdpa device
237 * @vdev: vdpa device
240 * @vdev: vdpa device
243 * @vdev: vdpa device
245 * @get_device_id: Get virtio device id
246 * @vdev: vdpa device
247 * Returns u32: virtio device id
248 * @get_vendor_id: Get id for the vendor that provides this device
249 * @vdev: vdpa device
251 * @get_status: Get the device status
252 * @vdev: vdpa device
253 * Returns u8: virtio device status
254 * @set_status: Set the device status
255 * @vdev: vdpa device
256 * @status: virtio device status
257 * @reset: Reset device
258 * @vdev: vdpa device
260 * @compat_reset: Reset device with compatibility quirks to
268 * @vdev: vdpa device
271 * @suspend: Suspend the device (optional)
272 * @vdev: vdpa device
274 * @resume: Resume the device (optional)
275 * @vdev: vdpa device
279 * @vdev: vdpa device
281 * @get_config: Read from device specific configuration space
282 * @vdev: vdpa device
288 * @set_config: Write to device specific configuration space
289 * @vdev: vdpa device
295 * @get_generation: Get device config generation (optional)
296 * @vdev: vdpa device
297 * Returns u32: device generation
299 * @vdev: vdpa device
301 * the device.
303 * @vdev: vdpa device
308 * @vdev: vdpa device
313 * @vdev: vdpa device
317 * @set_map: Set device memory mapping (optional)
318 * Needed for device that using device
320 * @vdev: vdpa device
326 * Needed for device that using device
329 * @vdev: vdpa device
334 * @perm: device access permission (VHOST_MAP_XX)
338 * Needed for device that using device
341 * @vdev: vdpa device
346 * @reset_map: Reset device memory mapping to the default
348 * Needed for devices that are using device
351 * i.e. device .reset op does not reset mapping
352 * @vdev: vdpa device
355 * @get_vq_dma_dev: Get the dma device for a specific
357 * @vdev: vdpa device
359 * Returns pointer to structure device or error (NULL)
360 * @bind_mm: Bind the device to a specific address space
363 * @vdev: vdpa device
365 * @unbind_mm: Unbind the device from the address space
367 * @vdev: vdpa device
369 * @vdev: vdpa device
396 /* Device ops */
439 struct device *(*get_vq_dma_dev)(struct vdpa_device *vdev, u16 idx);
443 /* Free device resources */
447 struct vdpa_device *__vdpa_alloc_device(struct device *parent,
454 * vdpa_alloc_device - allocate and initilaize a vDPA device
458 * @parent: the parent device
459 * @config: the bus operations that is supported by this device
460 * @ngroups: the number of virtqueue groups supported by this device
462 * @name: name of the vdpa device
463 * @use_va: indicate whether virtual address must be used by this device
484 * @driver: underlying device driver
485 * @probe: the function to call when a device is found. Returns 0 or -errno.
486 * @remove: the function to call when a device is removed.
508 static inline struct vdpa_device *dev_to_vdpa(struct device *_dev) in dev_to_vdpa()
523 static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) in vdpa_get_dma_dev()
572 * struct vdpa_mgmtdev_ops - vdpa device ops
573 * @dev_add: Add a vdpa device using alloc and register
574 * @mdev: parent device to use for device addition
575 * @name: name of the new vdpa device
576 * @config: config attributes to apply to the device under creation
577 * Driver need to add a new device using _vdpa_register_device()
578 * after fully initializing the vdpa device. Driver must return 0
580 * @dev_del: Remove a vdpa device using unregister
581 * @mdev: parent device to use for device removal
582 * @dev: vdpa device to remove
583 * Driver need to remove the specified device by calling
585 * @dev_set_attr: change a vdpa device's attr after it was create
586 * @mdev: parent device to use for device
587 * @dev: vdpa device structure
588 * @config:Attributes to be set for the device.
590 * the related information to the vdpa device. The driver must return 0
602 * struct vdpa_mgmt_dev - vdpa management device
603 * @device: Management parent device
604 * @ops: operations supported by management device
605 * @id_table: Pointer to device id table of supported ids
607 * management device support during dev_add callback
609 * @supported_features: features supported by device
610 * @max_supported_vqs: maximum number of virtqueues supported by device
613 struct device *device; member