Lines Matching refs:device
10 * @mdev: the modern virtio-pci device
106 * virtio_pci_find_capability - walk capabilities to find device info.
107 * @dev: the pci device
209 * vp_modern_probe: probe the modern virtio pci device, note that the
210 * caller is required to enable PCI device before calling this function.
211 * @mdev: the modern virtio-pci device
218 int err, common, isr, notify, device;
229 mdev->id.device = devid;
232 if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
235 if (pci_dev->device < 0x1040) {
236 /* Transitional devices: use the PCI subsystem device id as
237 * virtio device id, same as legacy driver always did.
239 mdev->id.device = pci_dev->subsystem_device;
241 /* Modern devices: simply use PCI device id, but start from 0x1040. */
242 mdev->id.device = pci_dev->device - 0x1040;
280 * device-specific configuration.
282 device = virtio_pci_find_capability(pci_dev, VIRTIO_PCI_CAP_DEVICE_CFG,
339 if (device) {
340 mdev->device = vp_modern_map_capability(mdev, device, 0, 4,
344 if (!mdev->device)
364 * vp_modern_remove: remove and cleanup the modern virtio pci device
365 * @mdev: the modern virtio-pci device
371 if (mdev->device)
372 pci_iounmap(pci_dev, mdev->device);
382 * vp_modern_get_features - get features from device
383 * @mdev: the modern virtio-pci device
385 * Returns the features read from the device
403 * vp_modern_get_driver_features - get driver features from device
404 * @mdev: the modern virtio-pci device
406 * Returns the driver features read from the device
424 * vp_modern_set_features - set features to device
425 * @mdev: the modern virtio-pci device
426 * @features: the features set to device
441 * vp_modern_generation - get the device genreation
442 * @mdev: the modern virtio-pci device
444 * Returns the genreation read from device
455 * vp_modern_get_status - get the device status
456 * @mdev: the modern virtio-pci device
458 * Returns the status read from device
469 * vp_modern_set_status - set status to device
470 * @mdev: the modern virtio-pci device
471 * @status: the status set to device
489 * @mdev: the modern virtio-pci device
505 * @mdev: the modern virtio-pci device
527 * @mdev: the modern virtio-pci device
531 * Returns the config vector read from the device
540 /* Flush the write out to device */
547 * @mdev: the modern virtio-pci device
550 * Returns the config vector read from the device
560 /* Will also flush the write out to device */
567 * @mdev: the modern virtio-pci device
571 * @device_addr: address of the device area
592 * @mdev: the modern virtio-pci device
606 * @mdev: the modern virtio-pci device
622 * @mdev: the modern virtio-pci device
637 * @mdev: the modern virtio-pci device
654 * @mdev: the modern virtio-pci device
666 * @mdev: the modern virtio-pci device
682 * @mdev: the modern virtio-pci device