Displaying 20 results from an estimated 36 matches for "vmbus_remove".
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...vers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e15c465..35503b6 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
 	struct tasklet_struct event_dpc;
 };
 
-static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
 static void vmbus_shutdown(struct device *device);
 
@@ -199,6 +198,59 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
 	return match;
 }
 
+
+/*
+ * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
+ *
+ * We need...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...vers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e15c465..35503b6 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
 	struct tasklet_struct event_dpc;
 };
 
-static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
 static void vmbus_shutdown(struct device *device);
 
@@ -199,6 +198,59 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
 	return match;
 }
 
+
+/*
+ * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
+ *
+ * We need...
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...we specify.
+	 */
+	avail_irq_mask = probe_irq_on();
+	if (avail_irq_mask != 0)
+		irq = ffs(avail_irq_mask);
+	probe_irq_off(avail_irq_mask);
+	return irq;
+}
+
 static int vmbus_match(struct device *device, struct device_driver *driver);
 static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
@@ -80,7 +97,6 @@ EXPORT_SYMBOL(vmbus_loglevel);
 	/* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
 	/* (((VMBUS | VMBUS_DRV)<<16) | DEBUG_LVL_ENTEREXIT); */
 
-static int vmbus_irq = VMBUS_IRQ;
 
 /* Set up per device attributes in /sys/bus/vmbus/devices/<bu...
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...we specify.
+	 */
+	avail_irq_mask = probe_irq_on();
+	if (avail_irq_mask != 0)
+		irq = ffs(avail_irq_mask);
+	probe_irq_off(avail_irq_mask);
+	return irq;
+}
+
 static int vmbus_match(struct device *device, struct device_driver *driver);
 static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
@@ -80,7 +97,6 @@ EXPORT_SYMBOL(vmbus_loglevel);
 	/* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
 	/* (((VMBUS | VMBUS_DRV)<<16) | DEBUG_LVL_ENTEREXIT); */
 
-static int vmbus_irq = VMBUS_IRQ;
 
 /* Set up per device attributes in /sys/bus/vmbus/devices/<bu...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...-		ret = -1;
+		ret = PTR_ERR(root_dev);
 		goto cleanup;
 	}
-	/* strcpy(dev_ctx->device.bus_id, dev_ctx->device_obj.name); */
-	dev_set_name(&dev_ctx->device, "vmbus_0_0");
-
-	/* No need to bind a driver to the root device. */
-	dev_ctx->device.parent = NULL;
-	/* NULL; vmbus_remove() does not get invoked */
-	dev_ctx->device.bus = &vmbus_drv_ctx->bus;
 
-	/* Setup the device dispatch table */
-	dev_ctx->device.release = vmbus_bus_release;
-
-	/* register the  root device */
-	ret = device_register(&dev_ctx->device);
+	/*
+	 * Notify the hypervisor of our i...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
...-		ret = -1;
+		ret = PTR_ERR(root_dev);
 		goto cleanup;
 	}
-	/* strcpy(dev_ctx->device.bus_id, dev_ctx->device_obj.name); */
-	dev_set_name(&dev_ctx->device, "vmbus_0_0");
-
-	/* No need to bind a driver to the root device. */
-	dev_ctx->device.parent = NULL;
-	/* NULL; vmbus_remove() does not get invoked */
-	dev_ctx->device.bus = &vmbus_drv_ctx->bus;
 
-	/* Setup the device dispatch table */
-	dev_ctx->device.release = vmbus_bus_release;
-
-	/* register the  root device */
-	ret = device_register(&dev_ctx->device);
+	/*
+	 * Notify the hypervisor of our i...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
...v->probe) {
+		ret = device_obj->probe_error = drv->probe(child_device);
 		if (ret != 0) {
 			DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
 				   "(%p) on driver %s (%d)...",
@@ -931,7 +931,7 @@ static int vmbus_probe(struct device *child_device)
 static int vmbus_remove(struct device *child_device)
 {
 	int ret;
-	struct hyperv_driver *driver_ctx;
+	struct hyperv_driver *drv;
 
 	/* Special case root bus device */
 	if (child_device->parent == NULL) {
@@ -943,14 +943,14 @@ static int vmbus_remove(struct device *child_device)
 	}
 
 	if (child_device->driver)...
2011 Feb 26
2
[PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
...v->probe) {
+		ret = device_obj->probe_error = drv->probe(child_device);
 		if (ret != 0) {
 			DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
 				   "(%p) on driver %s (%d)...",
@@ -931,7 +931,7 @@ static int vmbus_probe(struct device *child_device)
 static int vmbus_remove(struct device *child_device)
 {
 	int ret;
-	struct hyperv_driver *driver_ctx;
+	struct hyperv_driver *drv;
 
 	/* Special case root bus device */
 	if (child_device->parent == NULL) {
@@ -943,14 +943,14 @@ static int vmbus_remove(struct device *child_device)
 	}
 
 	if (child_device->driver)...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...specify.
+	 */
+
+	avail_irq_mask = probe_irq_on();
+	if (avail_irq_mask != 0)
+		irq = ffs(avail_irq_mask);
+	probe_irq_off(avail_irq_mask);
+	return irq;
+}
+
 static int vmbus_match(struct device *device, struct device_driver *driver);
 static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
@@ -80,7 +99,6 @@ EXPORT_SYMBOL(vmbus_loglevel);
 	/* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
 	/* (((VMBUS | VMBUS_DRV)<<16) | DEBUG_LVL_ENTEREXIT); */
 
-static int vmbus_irq = VMBUS_IRQ;
 
 /* Set up per device attributes in /sys/bus/vmbus/devices/<bu...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...specify.
+	 */
+
+	avail_irq_mask = probe_irq_on();
+	if (avail_irq_mask != 0)
+		irq = ffs(avail_irq_mask);
+	probe_irq_off(avail_irq_mask);
+	return irq;
+}
+
 static int vmbus_match(struct device *device, struct device_driver *driver);
 static int vmbus_probe(struct device *device);
 static int vmbus_remove(struct device *device);
@@ -80,7 +99,6 @@ EXPORT_SYMBOL(vmbus_loglevel);
 	/* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
 	/* (((VMBUS | VMBUS_DRV)<<16) | DEBUG_LVL_ENTEREXIT); */
 
-static int vmbus_irq = VMBUS_IRQ;
 
 /* Set up per device attributes in /sys/bus/vmbus/devices/<bu...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...o_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,7 @@ static int vmbus_probe(struct device *child_device)
 static int vmbus_remove(struct device *child_device)
 {
 	int ret;
-	struct driver_context *driver_ctx;
+	struct hyperv_driver *driver_ctx;
 
 	/* Special case root bus device */
 	if (child_device->parent == NULL) {
@@ -943,7 +943,7 @@ static int vmbus_remove(struct device *child_device)
 	}
 
 	if (child_device->d...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...o_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,7 @@ static int vmbus_probe(struct device *child_device)
 static int vmbus_remove(struct device *child_device)
 {
 	int ret;
-	struct driver_context *driver_ctx;
+	struct hyperv_driver *driver_ctx;
 
 	/* Special case root bus device */
 	if (child_device->parent == NULL) {
@@ -943,7 +943,7 @@ static int vmbus_remove(struct device *child_device)
 	}
 
 	if (child_device->d...
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 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
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
2010 Mar 04
1
[PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
..._cb(struct work_struct *context)
        DPRINT_EXIT(VMBUS_DRV);
 }
-/**
+/*
  * vmbus_probe - Add the new vmbus's child device
  */
 static int vmbus_probe(struct device *child_device)
@@ -777,7 +803,7 @@ static int vmbus_probe(struct device *child_device)
        return ret;
 }
-/**
+/*
  * vmbus_remove - Remove a vmbus device
  */
 static int vmbus_remove(struct device *child_device)
@@ -819,7 +845,7 @@ static int vmbus_remove(struct device *child_device)
        return 0;
 }
-/**
+/*
  * vmbus_shutdown - Shutdown a vmbus device
  */
 static void vmbus_shutdown(struct device *child_device)
@@ -8...
2010 Mar 04
1
[PATCH 1/1] Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
..._cb(struct work_struct *context)
        DPRINT_EXIT(VMBUS_DRV);
 }
-/**
+/*
  * vmbus_probe - Add the new vmbus's child device
  */
 static int vmbus_probe(struct device *child_device)
@@ -777,7 +803,7 @@ static int vmbus_probe(struct device *child_device)
        return ret;
 }
-/**
+/*
  * vmbus_remove - Remove a vmbus device
  */
 static int vmbus_remove(struct device *child_device)
@@ -819,7 +845,7 @@ static int vmbus_remove(struct device *child_device)
        return 0;
 }
-/**
+/*
  * vmbus_shutdown - Shutdown a vmbus device
  */
 static void vmbus_shutdown(struct device *child_device)
@@ -8...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...device_unregister(struct hv_device *device_obj)
 {
 	struct vm_device *device_ctx = to_vm_device(device_obj);
 
-	DPRINT_INFO(VMBUS_DRV, "unregistering child device (%p)",
-		    &device_ctx->device);
-
 	/*
 	 * Kick off the process of unregistering the device.
 	 * This will call vmbus_remove() and eventually vmbus_device_release()
 	 */
 	device_unregister(&device_ctx->device);
 
-	DPRINT_INFO(VMBUS_DRV, "child device (%p) unregistered",
-		    &device_ctx->device);
+	pr_info("%s: child device %s unregistered", VMBUS_MOD,
+		    dev_name(&device_ct...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...device_unregister(struct hv_device *device_obj)
 {
 	struct vm_device *device_ctx = to_vm_device(device_obj);
 
-	DPRINT_INFO(VMBUS_DRV, "unregistering child device (%p)",
-		    &device_ctx->device);
-
 	/*
 	 * Kick off the process of unregistering the device.
 	 * This will call vmbus_remove() and eventually vmbus_device_release()
 	 */
 	device_unregister(&device_ctx->device);
 
-	DPRINT_INFO(VMBUS_DRV, "child device (%p) unregistered",
-		    &device_ctx->device);
+	pr_info("%s: child device %s unregistered", VMBUS_MOD,
+		    dev_name(&device_ct...