Lines Matching full:device
6 #include <linux/device.h>
48 * @last_avail_counter: last driver ring wrap counter observed by device
49 * @last_avail_idx: device available index
50 * @last_used_counter: device ring wrap counter
70 * struct vdpa_device - representation of a vDPA device
71 * @dev: underlying device
72 * @dma_dev: the actual device that is performing DMA
76 * @config: the configuration ops for this device.
78 * @index: device index
82 * @use_va: indicate whether virtual address must be used by this device
84 * @mdev: management device pointer; caller must setup when registering device as part
88 struct device dev;
89 struct device *dma_dev;
103 * struct vdpa_iova_range - the IOVA range support by the device
123 * struct vdpa_map_file - file area for device memory mapping
133 * struct vdpa_config_ops - operations for configuring a vDPA device.
134 * Note: vDPA device drivers are required to implement all of the
139 * @vdev: vdpa device
143 * @device_area: address of device area
146 * @vdev: vdpa device
150 * @vdev: vdpa device
154 * @vdev: vdpa device
162 * @vdev: vdpa device
166 * @vdev: vdpa device
170 * @vdev: vdpa device
174 * @vdev: vdpa device
179 * @vdev: vdpa device
182 * @get_vendor_vq_stats: Get the vendor statistics of a device.
183 * @vdev: vdpa device
189 * @vdev: vdpa device
194 * @vdev: vdpa device
199 * for the device
200 * @vdev: vdpa device
204 * @vdev: vdpa device
209 * @vdev: vdpa device
217 * @get_device_features: Get virtio features supported by the device
218 * @vdev: vdpa device
220 * device
223 * device.
225 * @vdev: vdpa device
229 * @vdev: vdpa device
232 * @vdev: vdpa device
235 * @vdev: vdpa device
238 * @vdev: vdpa device
240 * @get_device_id: Get virtio device id
241 * @vdev: vdpa device
242 * Returns u32: virtio device id
243 * @get_vendor_id: Get id for the vendor that provides this device
244 * @vdev: vdpa device
246 * @get_status: Get the device status
247 * @vdev: vdpa device
248 * Returns u8: virtio device status
249 * @set_status: Set the device status
250 * @vdev: vdpa device
251 * @status: virtio device status
252 * @reset: Reset device
253 * @vdev: vdpa device
255 * @compat_reset: Reset device with compatibility quirks to
263 * @vdev: vdpa device
266 * @suspend: Suspend the device (optional)
267 * @vdev: vdpa device
269 * @resume: Resume the device (optional)
270 * @vdev: vdpa device
274 * @vdev: vdpa device
276 * @get_config: Read from device specific configuration space
277 * @vdev: vdpa device
283 * @set_config: Write to device specific configuration space
284 * @vdev: vdpa device
290 * @get_generation: Get device config generation (optional)
291 * @vdev: vdpa device
292 * Returns u32: device generation
294 * @vdev: vdpa device
296 * the device.
298 * @vdev: vdpa device
303 * @vdev: vdpa device
308 * @vdev: vdpa device
312 * @set_map: Set device memory mapping (optional)
313 * Needed for device that using device
315 * @vdev: vdpa device
321 * Needed for device that using device
324 * @vdev: vdpa device
329 * @perm: device access permission (VHOST_MAP_XX)
333 * Needed for device that using device
336 * @vdev: vdpa device
341 * @reset_map: Reset device memory mapping to the default
343 * Needed for devices that are using device
346 * i.e. device .reset op does not reset mapping
347 * @vdev: vdpa device
350 * @get_vq_dma_dev: Get the dma device for a specific
352 * @vdev: vdpa device
354 * Returns pointer to structure device or error (NULL)
355 * @bind_mm: Bind the device to a specific address space
358 * @vdev: vdpa device
360 * @unbind_mm: Unbind the device from the address space
362 * @vdev: vdpa device
364 * @vdev: vdpa device
390 /* Device ops */
433 struct device *(*get_vq_dma_dev)(struct vdpa_device *vdev, u16 idx);
437 /* Free device resources */
441 struct vdpa_device *__vdpa_alloc_device(struct device *parent,
448 * vdpa_alloc_device - allocate and initilaize a vDPA device
452 * @parent: the parent device
453 * @config: the bus operations that is supported by this device
454 * @ngroups: the number of virtqueue groups supported by this device
456 * @name: name of the vdpa device
457 * @use_va: indicate whether virtual address must be used by this device
478 * @driver: underlying device driver
479 * @probe: the function to call when a device is found. Returns 0 or -errno.
480 * @remove: the function to call when a device is removed.
502 static inline struct vdpa_device *dev_to_vdpa(struct device *_dev) in dev_to_vdpa()
517 static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev) in vdpa_get_dma_dev()
566 * struct vdpa_mgmtdev_ops - vdpa device ops
567 * @dev_add: Add a vdpa device using alloc and register
568 * @mdev: parent device to use for device addition
569 * @name: name of the new vdpa device
570 * @config: config attributes to apply to the device under creation
571 * Driver need to add a new device using _vdpa_register_device()
572 * after fully initializing the vdpa device. Driver must return 0
574 * @dev_del: Remove a vdpa device using unregister
575 * @mdev: parent device to use for device removal
576 * @dev: vdpa device to remove
577 * Driver need to remove the specified device by calling
587 * struct vdpa_mgmt_dev - vdpa management device
588 * @device: Management parent device
589 * @ops: operations supported by management device
590 * @id_table: Pointer to device id table of supported ids
592 * management device support during dev_add callback
594 * @supported_features: features supported by device
595 * @max_supported_vqs: maximum number of virtqueues supported by device
598 struct device *device; member