search for: kobj_uevent_env

Displaying 20 results from an estimated 61 matches for "kobj_uevent_env".

2019 Oct 15
1
[PATCH V3 2/7] mdev: bus uevent support
...7c40ce86ee3..319d886ffaf7 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -82,9 +82,17 @@ static int mdev_match(struct device *dev, struct device_driver *drv) > return 0; > } > > +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) > +{ > + struct mdev_device *mdev = to_mdev_device(dev); > + > + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); > +} > + > struct bus_type mdev_bus_type = { > .name = "mdev", > .match = mdev_match, > + .uevent =...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...rivers/char/virtio_console.c index 031be0b..96c5ed9 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2190,6 +2190,27 @@ static struct virtio_driver virtio_rproc_serial = { .remove = virtcons_remove, }; +int class_virtio_ports_uevent(struct device *_dev, struct kobj_uevent_env *env) +{ + struct port *port = dev_get_drvdata(_dev); + struct device *dev; + int err; + + if (!port || !port->portdev || !port->portdev->vdev) + return 0; + + dev = &port->portdev->vdev->dev; + err = add_uevent_var(env, "DRIVER=%s", dev->driver->name); + if (...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...rivers/char/virtio_console.c index 031be0b..96c5ed9 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2190,6 +2190,27 @@ static struct virtio_driver virtio_rproc_serial = { .remove = virtcons_remove, }; +int class_virtio_ports_uevent(struct device *_dev, struct kobj_uevent_env *env) +{ + struct port *port = dev_get_drvdata(_dev); + struct device *dev; + int err; + + if (!port || !port->portdev || !port->portdev->vdev) + return 0; + + dev = &port->portdev->vdev->dev; + err = add_uevent_var(env, "DRIVER=%s", dev->driver->name); + if (...
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
This patch-set fixes the following issues in the vmbus driver (vmbus_drv.c): Make vmbus driver a platform pci device and cleanup root device management and irq allocation (patches 1/12 through 3/12): 1) Make vmbus driver a platform pci driver. 2) Cleanup root device management. 3) Leverage the pci model for allocating irq. General cleanup of vmbus driver (patches 4/12 though 12/12): 1)
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
This patch-set fixes the following issues in the vmbus driver (vmbus_drv.c): Make vmbus driver a platform pci device and cleanup root device management and irq allocation (patches 1/12 through 3/12): 1) Make vmbus driver a platform pci driver. 2) Cleanup root device management. 3) Leverage the pci model for allocating irq. General cleanup of vmbus driver (patches 4/12 though 12/12): 1)
2011 Sep 02
3
[PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
...O, vmbus_show_device_attr, NULL), __ATTR(server_monitor_pending, S_IRUGO, vmbus_show_device_attr, NULL), __ATTR(server_monitor_latency, S_IRUGO, vmbus_show_device_attr, NULL), @@ -242,12 +255,10 @@ static struct device_attribute vmbus_dev static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) { struct hv_device *dev = device_to_hv_device(device); - int i, ret; - char alias_name[((sizeof((struct hv_vmbus_device_id *)0)->guid) + 1) * 2]; - - for (i = 0; i < ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2); i += 2) - sprintf(&alias_name[i], "%02x", dev-...
2011 Sep 02
3
[PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
...O, vmbus_show_device_attr, NULL), __ATTR(server_monitor_pending, S_IRUGO, vmbus_show_device_attr, NULL), __ATTR(server_monitor_latency, S_IRUGO, vmbus_show_device_attr, NULL), @@ -242,12 +255,10 @@ static struct device_attribute vmbus_dev static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) { struct hv_device *dev = device_to_hv_device(device); - int i, ret; - char alias_name[((sizeof((struct hv_vmbus_device_id *)0)->guid) + 1) * 2]; - - for (i = 0; i < ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2); i += 2) - sprintf(&alias_name[i], "%02x", dev-...
2019 Oct 11
0
[PATCH V3 2/7] mdev: bus uevent support
...ers/vfio/mdev/mdev_driver.c index b7c40ce86ee3..319d886ffaf7 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -82,9 +82,17 @@ static int mdev_match(struct device *dev, struct device_driver *drv) return 0; } +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct mdev_device *mdev = to_mdev_device(dev); + + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); +} + struct bus_type mdev_bus_type = { .name = "mdev", .match = mdev_match, + .uevent = mdev_uevent, .probe = mdev_probe, .remove =...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...); + memcpy(&child_device_obj->device_id, instance, sizeof(struct hv_guid)); - return child_device_ctx; + return child_device_obj; } /* @@ -777,43 +777,43 @@ void vmbus_child_device_unregister(struct hyperv_device *device_obj) */ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) { - struct hyperv_device *device_ctx = device_to_hyperv_device(device); + struct hyperv_device *device_obj = device_to_hyperv_device(device); int ret; DPRINT_INFO(VMBUS_DRV, "generating uevent - VMBUS_DEVICE_CLASS_GUID={" "%02x%02x%02x%02x-%02x%02x-%02x%02x-"...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...); + memcpy(&child_device_obj->device_id, instance, sizeof(struct hv_guid)); - return child_device_ctx; + return child_device_obj; } /* @@ -777,43 +777,43 @@ void vmbus_child_device_unregister(struct hyperv_device *device_obj) */ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) { - struct hyperv_device *device_ctx = device_to_hyperv_device(device); + struct hyperv_device *device_obj = device_to_hyperv_device(device); int ret; DPRINT_INFO(VMBUS_DRV, "generating uevent - VMBUS_DEVICE_CLASS_GUID={" "%02x%02x%02x%02x-%02x%02x-%02x%02x-"...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...596efa6 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -1,3 +1,9 @@ +#ifndef DRIVERS_PCI_H +#define DRIVERS_PCI_H + +#define PCI_CFG_SPACE_SIZE 256 +#define PCI_CFG_SPACE_EXP_SIZE 4096 + /* Functions internal to the PCI core code */ extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); @@ -144,3 +150,17 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32,...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...596efa6 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -1,3 +1,9 @@ +#ifndef DRIVERS_PCI_H +#define DRIVERS_PCI_H + +#define PCI_CFG_SPACE_SIZE 256 +#define PCI_CFG_SPACE_EXP_SIZE 4096 + /* Functions internal to the PCI core code */ extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); @@ -144,3 +150,17 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32,...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
...iver.name); - driver_unregister(&driver_ctx->driver); + driver_unregister(&drv->driver); - driver_ctx->driver.bus = NULL; + drv->driver.bus = NULL; } EXPORT_SYMBOL(vmbus_child_driver_unregister); @@ -849,18 +849,18 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) static int vmbus_match(struct device *device, struct device_driver *driver) { int match = 0; - struct hyperv_driver *driver_ctx = driver_to_hyperv_driver(driver); + struct hyperv_driver *drv = driver_to_hyperv_driver(driver); struct hyperv_device *device_obj = device_to_hyperv_device(de...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
...iver.name); - driver_unregister(&driver_ctx->driver); + driver_unregister(&drv->driver); - driver_ctx->driver.bus = NULL; + drv->driver.bus = NULL; } EXPORT_SYMBOL(vmbus_child_driver_unregister); @@ -849,18 +849,18 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) static int vmbus_match(struct device *device, struct device_driver *driver) { int match = 0; - struct hyperv_driver *driver_ctx = driver_to_hyperv_driver(driver); + struct hyperv_driver *drv = driver_to_hyperv_driver(driver); struct hyperv_device *device_obj = device_to_hyperv_device(de...
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...iver_context { struct tasklet_struct msg_dpc; struct tasklet_struct event_dpc; - /* The bus root device */ - struct hv_device device_ctx; }; static int vmbus_match(struct device *device, struct device_driver *driver); @@ -60,7 +61,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env); static irqreturn_t vmbus_isr(int irq, void *dev_id); static void vmbus_device_release(struct device *device); -static void vmbus_bus_release(struct device *device); static ssize_t vmbus_show_device_attr(struct device *dev, struct device_attribute *dev_attr, @@ -117,54 +117,...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...iver_context { struct tasklet_struct msg_dpc; struct tasklet_struct event_dpc; - /* The bus root device */ - struct hv_device device_ctx; }; static int vmbus_match(struct device *device, struct device_driver *driver); @@ -60,7 +61,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env); static irqreturn_t vmbus_isr(int irq, void *dev_id); static void vmbus_device_release(struct device *device); -static void vmbus_bus_release(struct device *device); static ssize_t vmbus_show_device_attr(struct device *dev, struct device_attribute *dev_attr, @@ -117,54 +117,...
2019 Nov 05
0
[PATCH V8 1/6] mdev: class id support
...v_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + if (!ids) + return 0; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->class_id) + return 1; + return 0; +} + +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct mdev_device *mdev = to_mdev_device(dev); + + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); +} + struct bus_type mdev_bus_type = { .name = "mdev", + .match = mdev_match, + .uevent = mdev_uevent, .probe = mdev_probe, .remove =...
2019 Nov 04
0
[PATCH V7 1/6] mdev: class id support
...v_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + if (!ids) + return 0; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->class_id) + return 1; + return 0; +} + +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct mdev_device *mdev = to_mdev_device(dev); + + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); +} + struct bus_type mdev_bus_type = { .name = "mdev", + .match = mdev_match, + .uevent = mdev_uevent, .probe = mdev_probe, .remove =...