search for: device_for_each_child

Displaying 10 results from an estimated 10 matches for "device_for_each_child".

2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...gt;resource[0].end - pdev->resource[0].start + 1ULL, + (unsigned long long)pdev->resource[0].start, + (unsigned long long)pdev->resource[1].start, + pdev->id); + return 0; +} + +static int vm_cmdline_get(char *buffer, const struct kernel_param *kp) +{ + buffer[0] = '\0'; + device_for_each_child(&vm_cmdline_parent, buffer, + vm_cmdline_get_device); + return strlen(buffer) + 1; +} + +static struct kernel_param_ops vm_cmdline_param_ops = { + .set = vm_cmdline_set, + .get = vm_cmdline_get, +}; + +device_param_cb(device, &vm_cmdline_param_ops, NULL, S_IRUSR); + +static int vm_unregis...
2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...gt;resource[0].end - pdev->resource[0].start + 1ULL, + (unsigned long long)pdev->resource[0].start, + (unsigned long long)pdev->resource[1].start, + pdev->id); + return 0; +} + +static int vm_cmdline_get(char *buffer, const struct kernel_param *kp) +{ + buffer[0] = '\0'; + device_for_each_child(&vm_cmdline_parent, buffer, + vm_cmdline_get_device); + return strlen(buffer) + 1; +} + +static struct kernel_param_ops vm_cmdline_param_ops = { + .set = vm_cmdline_set, + .get = vm_cmdline_get, +}; + +device_param_cb(device, &vm_cmdline_param_ops, NULL, S_IRUSR); + +static int vm_unregis...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...resources), NULL, 0); + + id++; + } + + kfree(device); + + return 0; +} + +static int virtio_mmio_unregister_cmdline_device(struct device *dev, + void *data) +{ + platform_device_unregister(to_platform_device(dev)); + + return 0; +} + +static void virtio_mmio_unregister_cmdline_devices(void) +{ + device_for_each_child(&virtio_mmio_cmdline_parent, NULL, + virtio_mmio_unregister_cmdline_device); + device_unregister(&virtio_mmio_cmdline_parent); +} + +#else + +static int virtio_mmio_register_cmdline_devices(void) +{ + return 0; +} + +static void virtio_mmio_unregister_cmdline_devices(void) +{ +} + +#endif...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...resources), NULL, 0); + + id++; + } + + kfree(device); + + return 0; +} + +static int virtio_mmio_unregister_cmdline_device(struct device *dev, + void *data) +{ + platform_device_unregister(to_platform_device(dev)); + + return 0; +} + +static void virtio_mmio_unregister_cmdline_devices(void) +{ + device_for_each_child(&virtio_mmio_cmdline_parent, NULL, + virtio_mmio_unregister_cmdline_device); + device_unregister(&virtio_mmio_cmdline_parent); +} + +#else + +static int virtio_mmio_register_cmdline_devices(void) +{ + return 0; +} + +static void virtio_mmio_unregister_cmdline_devices(void) +{ +} + +#endif...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...+ +err_register: + kfree(vdpasim_dev); + vdpasim_dev = NULL; + return ret; +} + +static int vdpasim_device_remove_cb(struct device *dev, void *data) +{ + struct vdpa_device *vdpa = dev_to_vdpa(dev); + + vdpa_unregister_device(vdpa); + + return 0; +} + +static void __exit vdpasim_dev_exit(void) +{ + device_for_each_child(&vdpasim_dev->dev, NULL, + vdpasim_device_remove_cb); + device_unregister(&vdpasim_dev->dev); +} + +module_init(vdpasim_dev_init) +module_exit(vdpasim_dev_exit) + +MODULE_VERSION(DRV_VERSION); +MODULE_LICENSE(DRV_LICENSE); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION(DRV_DE...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...+ if (!IS_ERR(vdpasim_dev)) + return 0; + + return PTR_ERR(vdpasim_dev); +} + +static int vdpasim_device_remove_cb(struct device *dev, void *data) +{ + struct vdpa_device *vdpa = dev_to_vdpa(dev); + + vdpa_unregister_device(vdpa); + + return 0; +} + +static void __exit vdpasim_dev_exit(void) +{ + device_for_each_child(&vdpasim_dev->dev, NULL, + vdpasim_device_remove_cb); + device_unregister(&vdpasim_dev->dev); +} + +module_init(vdpasim_dev_init) +module_exit(vdpasim_dev_exit) + +MODULE_VERSION(DRV_VERSION); +MODULE_LICENSE(DRV_LICENSE); +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION(DRV_DE...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...ret; > +} > + > +static int vdpasim_device_remove_cb(struct device *dev, void *data) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + > + vdpa_unregister_device(vdpa); > + > + return 0; > +} > + > +static void __exit vdpasim_dev_exit(void) > +{ > + device_for_each_child(&vdpasim_dev->dev, NULL, > + vdpasim_device_remove_cb); > + device_unregister(&vdpasim_dev->dev); > +} > + > +module_init(vdpasim_dev_init) > +module_exit(vdpasim_dev_exit) > + > +MODULE_VERSION(DRV_VERSION); > +MODULE_LICENSE(DRV_LICENSE); > +MOD...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single