search for: child_device

Displaying 20 results from an estimated 32 matches for "child_device".

2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...g the device. + * This will call vmbus_remove() and eventually vmbus_device_release() + */ + device_unregister(&device_ctx->device); + + /* put_device(&device_ctx->device); */ +} + +/* + * vmbus_probe - Add the new vmbus's child device + */ +static int vmbus_probe(struct device *child_device) +{ + int ret = 0; + struct hv_driver *drv = + drv_to_hv_drv(child_device->driver); + struct hv_device *dev = device_to_hv_device(child_device); + + /* Let the specific open-source driver handles the probe if it can */ + if (drv->driver.probe) { + ret = dev->probe_error = + drv->dri...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...g the device. + * This will call vmbus_remove() and eventually vmbus_device_release() + */ + device_unregister(&device_ctx->device); + + /* put_device(&device_ctx->device); */ +} + +/* + * vmbus_probe - Add the new vmbus's child device + */ +static int vmbus_probe(struct device *child_device) +{ + int ret = 0; + struct hv_driver *drv = + drv_to_hv_drv(child_device->driver); + struct hv_device *dev = device_to_hv_device(child_device); + + /* Let the specific open-source driver handles the probe if it can */ + if (drv->driver.probe) { + ret = dev->probe_error = + drv->dri...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
..._ctx = - (struct vmbus_hyperv_driver *)driver_ctx; + (struct vmbus_hyperv_driver *)drv; device_obj->drv = &vmbus_drv_ctx->drv_obj; DPRINT_INFO(VMBUS_DRV, @@ -899,14 +899,14 @@ static void vmbus_probe_failed_cb(struct work_struct *context) static int vmbus_probe(struct device *child_device) { int ret = 0; - struct hyperv_driver *driver_ctx = + struct hyperv_driver *drv = driver_to_hyperv_driver(child_device->driver); struct hyperv_device *device_obj = device_to_hyperv_device(child_device); /* Let the specific open-source driver handles the probe if it can */ - if...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
..._ctx = - (struct vmbus_hyperv_driver *)driver_ctx; + (struct vmbus_hyperv_driver *)drv; device_obj->drv = &vmbus_drv_ctx->drv_obj; DPRINT_INFO(VMBUS_DRV, @@ -899,14 +899,14 @@ static void vmbus_probe_failed_cb(struct work_struct *context) static int vmbus_probe(struct device *child_device) { int ret = 0; - struct hyperv_driver *driver_ctx = + struct hyperv_driver *drv = driver_to_hyperv_driver(child_device->driver); struct hyperv_device *device_obj = device_to_hyperv_device(child_device); /* Let the specific open-source driver handles the probe if it can */ - if...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...+ struct vmbus_hyperv_driver *vmbus_drv_ctx = + (struct vmbus_hyperv_driver *)driver_ctx; device_obj->drv = &vmbus_drv_ctx->drv_obj; DPRINT_INFO(VMBUS_DRV, @@ -899,8 +899,8 @@ static void vmbus_probe_failed_cb(struct work_struct *context) static int vmbus_probe(struct device *child_device) { int ret = 0; - struct driver_context *driver_ctx = - driver_to_driver_context(child_device->driver); + struct hyperv_driver *driver_ctx = + driver_to_hyperv_driver(child_device->driver); struct hyperv_device *device_obj = device_to_hyperv_device(child_device); @@ -931,7 +931...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...+ struct vmbus_hyperv_driver *vmbus_drv_ctx = + (struct vmbus_hyperv_driver *)driver_ctx; device_obj->drv = &vmbus_drv_ctx->drv_obj; DPRINT_INFO(VMBUS_DRV, @@ -899,8 +899,8 @@ static void vmbus_probe_failed_cb(struct work_struct *context) static int vmbus_probe(struct device *child_device) { int ret = 0; - struct driver_context *driver_ctx = - driver_to_driver_context(child_device->driver); + struct hyperv_driver *driver_ctx = + driver_to_hyperv_driver(child_device->driver); struct hyperv_device *device_obj = device_to_hyperv_device(child_device); @@ -931,7 +931...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...ls(); vmbus_disconnect(); @@ -547,7 +484,7 @@ static void vmbus_bus_exit(void) hv_cleanup(); /* Unregister the root bus device */ - device_unregister(&dev_ctx->device); + root_device_unregister(root_dev); bus_unregister(&vmbus_drv_ctx->bus); @@ -672,7 +609,7 @@ int vmbus_child_device_register(struct hv_device *child_device_obj) /* The new device belongs to this bus */ child_device_obj->device.bus = &vmbus_drv.bus; /* device->dev.bus; */ - child_device_obj->device.parent = &vmbus_device->device; + child_device_obj->device.parent = root_dev; child_d...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...ls(); vmbus_disconnect(); @@ -547,7 +484,7 @@ static void vmbus_bus_exit(void) hv_cleanup(); /* Unregister the root bus device */ - device_unregister(&dev_ctx->device); + root_device_unregister(root_dev); bus_unregister(&vmbus_drv_ctx->bus); @@ -672,7 +609,7 @@ int vmbus_child_device_register(struct hv_device *child_device_obj) /* The new device belongs to this bus */ child_device_obj->device.bus = &vmbus_drv.bus; /* device->dev.bus; */ - child_device_obj->device.parent = &vmbus_device->device; + child_device_obj->device.parent = root_dev; child_d...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...ver.name); - driver_unregister(&driver_ctx->driver); + pr_info("%s: child driver unregistering - %s", VMBUS_MOD, + driver_ctx->driver.name); + driver_ctx->driver.bus = NULL; } EXPORT_SYMBOL(vmbus_child_driver_unregister); @@ -681,30 +661,11 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type, /* Allocate the new child device */ child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL); if (!child_device_ctx) { - DPRINT_ERR(VMBUS_DRV, - "unable to allocate device_context for child device"); + pr_err("%s: %s Unable to allocate d...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...ver.name); - driver_unregister(&driver_ctx->driver); + pr_info("%s: child driver unregistering - %s", VMBUS_MOD, + driver_ctx->driver.name); + driver_ctx->driver.bus = NULL; } EXPORT_SYMBOL(vmbus_child_driver_unregister); @@ -681,30 +661,11 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type, /* Allocate the new child device */ child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL); if (!child_device_ctx) { - DPRINT_ERR(VMBUS_DRV, - "unable to allocate device_context for child device"); + pr_err("%s: %s Unable to allocate d...
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied. This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 2) The Windows host cannot handle the vmbus_driver being unloaded and subsequently loaded. Cleanup the driver with this in mind. 3) Get rid of struct hv_bus that embedded struct bus_type to c...
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied. This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 2) The Windows host cannot handle the vmbus_driver being unloaded and subsequently loaded. Cleanup the driver with this in mind. 3) Get rid of struct hv_bus that embedded struct bus_type to c...
2011 Feb 24
4
[PATCH ] Staging: hv: Hyper-V driver cleanup
...* vmbus root device */ +static struct hyperv_device *vmbus_device; /* vmbus root device */ /* * vmbus_child_dev_add - Registers the child device with the vmbus */ -int vmbus_child_dev_add(struct hv_device *child_dev) +int vmbus_child_dev_add(struct hyperv_device *child_dev) { return vmbus_child_device_register(vmbus_device, child_dev); } @@ -158,15 +157,15 @@ int vmbus_child_dev_add(struct hv_device *child_dev) /* * vmbus_dev_add - Callback when the root bus device is added */ -static int vmbus_dev_add(struct hv_device *dev, void *info) +static int vmbus_dev_add(struct hyperv_device *dev,...
2011 Feb 24
4
[PATCH ] Staging: hv: Hyper-V driver cleanup
...* vmbus root device */ +static struct hyperv_device *vmbus_device; /* vmbus root device */ /* * vmbus_child_dev_add - Registers the child device with the vmbus */ -int vmbus_child_dev_add(struct hv_device *child_dev) +int vmbus_child_dev_add(struct hyperv_device *child_dev) { return vmbus_child_device_register(vmbus_device, child_dev); } @@ -158,15 +157,15 @@ int vmbus_child_dev_add(struct hv_device *child_dev) /* * vmbus_dev_add - Callback when the root bus device is added */ -static int vmbus_dev_add(struct hv_device *dev, void *info) +static int vmbus_dev_add(struct hyperv_device *dev,...
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 Apr 26
29
[PATCH 00/25] Staging: hv: Cleanup vmbus driver code
...th the following issues: 1) Cleanup unnecessary state in struct hv_device and struct hv_driver to be compliant with the Linux Driver model. 2) Cleanup the vmbus_match() function to conform with the Linux Driver model. 3) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 4) The Windows host cannot handle the vmbus_driver being unloaded and subsequently loaded. Cleanup the driver with this in mind. 5) Get rid of struct hv_bus that embedded struct bus_type to c...
2011 Apr 26
29
[PATCH 00/25] Staging: hv: Cleanup vmbus driver code
...th the following issues: 1) Cleanup unnecessary state in struct hv_device and struct hv_driver to be compliant with the Linux Driver model. 2) Cleanup the vmbus_match() function to conform with the Linux Driver model. 3) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 4) The Windows host cannot handle the vmbus_driver being unloaded and subsequently loaded. Cleanup the driver with this in mind. 5) Get rid of struct hv_bus that embedded struct bus_type to c...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...ev_rm(dev); if (driver->cleanup) driver->cleanup(driver); /* Unregister the root bus device */ - device_unregister(&dev_ctx->device); + device_unregister(&dev->device); bus_unregister(&vmbus_drv_ctx->bus); @@ -671,11 +671,11 @@ struct hyperv_device *vmbus_child_device_create(struct hv_guid *type, struct hv_guid *instance, struct vmbus_channel *channel) { - struct hyperv_device *child_device_ctx; + struct hyperv_device *child_device_obj; /* Allocate the new child device */ - child_device_ctx = kzalloc(sizeof(struct hyperv_device), GFP_KER...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...ev_rm(dev); if (driver->cleanup) driver->cleanup(driver); /* Unregister the root bus device */ - device_unregister(&dev_ctx->device); + device_unregister(&dev->device); bus_unregister(&vmbus_drv_ctx->bus); @@ -671,11 +671,11 @@ struct hyperv_device *vmbus_child_device_create(struct hv_guid *type, struct hv_guid *instance, struct vmbus_channel *channel) { - struct hyperv_device *child_device_ctx; + struct hyperv_device *child_device_obj; /* Allocate the new child device */ - child_device_ctx = kzalloc(sizeof(struct hyperv_device), GFP_KER...