search for: device_ctx

Displaying 20 results from an estimated 62 matches for "device_ctx".

2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...ers/staging/hv/blkvsc_drv.c index 58ab0e8..305a665 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct hyperv_device *device_ctx; + struct hyperv_device *device_obj; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -298,7 +298,7 @@ static int blkvsc_probe(struct device *device) goto Cleanup; } - blkdev->device_ctx = device_obj; + blkdev->device_obj = device_obj; /* this identified...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...ers/staging/hv/blkvsc_drv.c index 58ab0e8..305a665 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct hyperv_device *device_ctx; + struct hyperv_device *device_obj; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -298,7 +298,7 @@ static int blkvsc_probe(struct device *device) goto Cleanup; } - blkdev->device_ctx = device_obj; + blkdev->device_obj = device_obj; /* this identified...
2011 Feb 24
4
[PATCH ] Staging: hv: Hyper-V driver cleanup
...drivers/staging/hv/blkvsc_drv.c index 36a0adb..194f648 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct vm_device *device_ctx; + struct hyperv_device *hyperv_dev; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -116,10 +116,10 @@ struct block_device_context { }; /* Per driver */ -struct blkvsc_driver_context { +struct blkvsc_hyperv_driver { /* !! These must be the first 2 fields !! */...
2011 Feb 24
4
[PATCH ] Staging: hv: Hyper-V driver cleanup
...drivers/staging/hv/blkvsc_drv.c index 36a0adb..194f648 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct vm_device *device_ctx; + struct hyperv_device *hyperv_dev; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -116,10 +116,10 @@ struct block_device_context { }; /* Per driver */ -struct blkvsc_driver_context { +struct blkvsc_hyperv_driver { /* !! These must be the first 2 fields !! */...
2011 Feb 26
5
[PATCH 1/6] Staging: hv: Unify hyper-v device abstractions
...id, sizeof(struct hv_guid)); drv_ctx->probe = blkvsc_probe; @@ -249,8 +249,7 @@ static int blkvsc_probe(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj; - struct vm_device *device_ctx = device_to_vm_device(device); - struct hv_device *device_obj = &device_ctx->device_obj; + struct vm_device *device_obj = device_to_vm_device(device); struct block_device_context *blkdev = NULL; struct storvsc_device_info device_info; @@ -282,7 +281,7 @@ static int blkvsc_probe(struct...
2011 Feb 26
5
[PATCH 1/6] Staging: hv: Unify hyper-v device abstractions
...id, sizeof(struct hv_guid)); drv_ctx->probe = blkvsc_probe; @@ -249,8 +249,7 @@ static int blkvsc_probe(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj; - struct vm_device *device_ctx = device_to_vm_device(device); - struct hv_device *device_obj = &device_ctx->device_obj; + struct vm_device *device_obj = device_to_vm_device(device); struct block_device_context *blkdev = NULL; struct storvsc_device_info device_info; @@ -282,7 +281,7 @@ static int blkvsc_probe(struct...
2011 Feb 26
1
[PATCH 2/6] Staging: hv: Rename vm_device to hyperv_device
...drivers/staging/hv/blkvsc_drv.c index 6d1a783..58ab0e8 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct vm_device *device_ctx; + struct hyperv_device *device_ctx; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -249,7 +249,7 @@ static int blkvsc_probe(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv...
2011 Feb 26
1
[PATCH 2/6] Staging: hv: Rename vm_device to hyperv_device
...drivers/staging/hv/blkvsc_drv.c index 6d1a783..58ab0e8 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -95,7 +95,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct vm_device *device_ctx; + struct hyperv_device *device_ctx; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -249,7 +249,7 @@ static int blkvsc_probe(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...d 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 device_context child device", + VMBUS_MOD, __func__); return NULL; }...
2011 Feb 22
4
[PATCH 1/6] Staging: hv: vmbus_drv.c Replaced DPRINT with native pr_XXX
...d 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 device_context child device", + VMBUS_MOD, __func__); return NULL; }...
2011 Feb 23
7
[PATCH 1/4] staging: hv: Fix the code depending on struct vmbus_driver_context data order
...e. Instead, the bus field is */ - /* used to represent the driver */ - struct driver_context drv_ctx; struct hv_driver drv_obj; struct bus_type bus; @@ -869,14 +864,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver) /* We found our driver ? */ if (memcmp(&device_ctx->class_id, &driver_ctx->class_id, sizeof(struct hv_guid)) == 0) { - /* - * !! NOTE: The driver_ctx is not a vmbus_drv_ctx. We typecast - * it here to access the struct hv_driver field - */ - struct vmbus_driver_context *vmbus_drv_ctx = - (struct vmbus_driver_context *)driv...
2011 Feb 23
7
[PATCH 1/4] staging: hv: Fix the code depending on struct vmbus_driver_context data order
...e. Instead, the bus field is */ - /* used to represent the driver */ - struct driver_context drv_ctx; struct hv_driver drv_obj; struct bus_type bus; @@ -869,14 +864,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver) /* We found our driver ? */ if (memcmp(&device_ctx->class_id, &driver_ctx->class_id, sizeof(struct hv_guid)) == 0) { - /* - * !! NOTE: The driver_ctx is not a vmbus_drv_ctx. We typecast - * it here to access the struct hv_driver field - */ - struct vmbus_driver_context *vmbus_drv_ctx = - (struct vmbus_driver_context *)driv...
2011 Mar 07
0
[PATCH 10/16] Staging: hv: Eliminate netvsc_driver_context
...g_netvsc_drv; /* no-op so the netdev core doesn't return -EINVAL when modifying the the * multicast address list in SIOCADDMULTI. hv is setup to get all multicast @@ -134,9 +131,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) struct net_device_context *net_device_ctx = netdev_priv(net); struct hv_driver *drv = drv_to_hv_drv(net_device_ctx->device_ctx->device.driver); - struct netvsc_driver_context *net_drv_ctx = - (struct netvsc_driver_context *)drv->priv; - struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; + struct netvsc_driv...
2011 Mar 07
0
[PATCH 10/16] Staging: hv: Eliminate netvsc_driver_context
...g_netvsc_drv; /* no-op so the netdev core doesn't return -EINVAL when modifying the the * multicast address list in SIOCADDMULTI. hv is setup to get all multicast @@ -134,9 +131,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) struct net_device_context *net_device_ctx = netdev_priv(net); struct hv_driver *drv = drv_to_hv_drv(net_device_ctx->device_ctx->device.driver); - struct netvsc_driver_context *net_drv_ctx = - (struct netvsc_driver_context *)drv->priv; - struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; + struct netvsc_driv...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...ons(-) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 2d40f5f..417e5f7 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -46,6 +46,7 @@ struct net_device_context { /* point back to our device context */ struct hv_device *device_ctx; unsigned long avail; + struct work_struct work; }; @@ -219,6 +220,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status) { struct net_device *net = dev_get_drvdata(&device_obj->device); + struct net_device_context *ndev_ctx;...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...ons(-) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 2d40f5f..417e5f7 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -46,6 +46,7 @@ struct net_device_context { /* point back to our device context */ struct hv_device *device_ctx; unsigned long avail; + struct work_struct work; }; @@ -219,6 +220,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status) { struct net_device *net = dev_get_drvdata(&device_obj->device); + struct net_device_context *ndev_ctx;...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...allback because we cannot invoked device_unregister() inside + * vmbus_probe() since vmbus_probe() may be invoked inside device_register() + * i.e. we cannot call device_unregister() inside device_register() + */ +static void vmbus_probe_failed_cb(struct work_struct *context) +{ + struct hv_device *device_ctx = (struct hv_device *)context; + + /* + * Kick off the process of unregistering the device. + * This will call vmbus_remove() and eventually vmbus_device_release() + */ + device_unregister(&device_ctx->device); + + /* put_device(&device_ctx->device); */ +} + +/* + * vmbus_probe - A...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...allback because we cannot invoked device_unregister() inside + * vmbus_probe() since vmbus_probe() may be invoked inside device_register() + * i.e. we cannot call device_unregister() inside device_register() + */ +static void vmbus_probe_failed_cb(struct work_struct *context) +{ + struct hv_device *device_ctx = (struct hv_device *)context; + + /* + * Kick off the process of unregistering the device. + * This will call vmbus_remove() and eventually vmbus_device_release() + */ + device_unregister(&device_ctx->device); + + /* put_device(&device_ctx->device); */ +} + +/* + * vmbus_probe - A...
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)