search for: vmbus_driver_context

Displaying 20 results from an estimated 36 matches for "vmbus_driver_context".

2011 Mar 10
1
[PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure
Now that struct vmbus_driver_context is properly cleaned up, rename this structure appropriately and cleanup the code. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Mike Sterling <mike.sterling at microsoft.com> Signed-off-by: Abhishek...
2011 Mar 10
1
[PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure
Now that struct vmbus_driver_context is properly cleaned up, rename this structure appropriately and cleanup the code. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Mike Sterling <mike.sterling at microsoft.com> Signed-off-by: Abhishek...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...++ b/drivers/staging/hv/vmbus_drv.c @@ -36,9 +36,7 @@ #include "vmbus_private.h" -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ 0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -57,6 +55,27 @@ struct vmbus_driver_context { struct vm_device device_ctx; }; +/* + * Find an un-used IRQ that the VMBUS can use. If none is available; + * return -EBUSY. + */ +static int vmbus_get_irq(void) +{ + unsigned int avail_irq_mask; + int irq = -EBUSY; + + /* + * Pick the first...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...++ b/drivers/staging/hv/vmbus_drv.c @@ -36,9 +36,7 @@ #include "vmbus_private.h" -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ 0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -57,6 +55,27 @@ struct vmbus_driver_context { struct vm_device device_ctx; }; +/* + * Find an un-used IRQ that the VMBUS can use. If none is available; + * return -EBUSY. + */ +static int vmbus_get_irq(void) +{ + unsigned int avail_irq_mask; + int irq = -EBUSY; + + /* + * Pick the first...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Mike Sterling <mike.sterling at microsoft.com> Signed-off-by: Abhishek Kane <v-abkane at microsoft.com> Signed-off-by: Hank Janssen <hjanssen a...
2011 Mar 10
1
[PATCH 10/21] Staging: hv: Cleanup root device handling
Now we can complete the cleanup of the root device management. Use the preferred APIs for creating and managing the root device. As part of this cleanup get rid of the root device object from vmbus_driver_context. Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Mike Sterling <mike.sterling at microsoft.com> Signed-off-by: Abhishek Kane <v-abkane at microsoft.com> Signed-off-by: Hank Janssen <hjanssen a...
2011 Feb 23
7
[PATCH 1/4] staging: hv: Fix the code depending on struct vmbus_driver_context data order
The patch fixed the code depending on the exact order of fields in the struct vmbus_driver_context, so the unused field drv_ctx can be removed, and drv_obj doesn't have to be the second field in this structure. Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com&...
2011 Feb 23
7
[PATCH 1/4] staging: hv: Fix the code depending on struct vmbus_driver_context data order
The patch fixed the code depending on the exact order of fields in the struct vmbus_driver_context, so the unused field drv_ctx can be removed, and drv_obj doesn't have to be the second field in this structure. Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: K. Y. Srinivasan <kys at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com&...
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...++ b/drivers/staging/hv/vmbus_drv.c @@ -36,9 +36,7 @@ #include "vmbus_private.h" -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ 0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -57,6 +55,25 @@ struct vmbus_driver_context { struct vm_device device_ctx; }; +/* + * Find an un-used IRQ that the VMBUS can use. If none is available; return -1. + */ + +static int vmbus_get_irq(void) +{ + unsigned int avail_irq_mask; + int irq = -1; + /* + * Pick the first unused inter...
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...++ b/drivers/staging/hv/vmbus_drv.c @@ -36,9 +36,7 @@ #include "vmbus_private.h" -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ 0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -57,6 +55,25 @@ struct vmbus_driver_context { struct vm_device device_ctx; }; +/* + * Find an un-used IRQ that the VMBUS can use. If none is available; return -1. + */ + +static int vmbus_get_irq(void) +{ + unsigned int avail_irq_mask; + int irq = -1; + /* + * Pick the first unused inter...
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
...rm 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) Rename vmbus_driver_context structure and do related cleanup. 2) Get rid of forward declarations by moving code. Regards, K. Y
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
...rm 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) Rename vmbus_driver_context structure and do related cleanup. 2) Get rid of forward declarations by moving code. Regards, K. Y
2011 Feb 26
1
[PATCH 4/6] Staging: hv: Unify the hyperv driver abstractions
...vice *device); - void (*cleanup)(struct hv_driver *driver); -}; - #endif /* _VMBUS_API_H_ */ diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index a385bd2..3922a07 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -47,7 +47,7 @@ struct vmbus_driver_context { /* The driver field is not used in here. Instead, the bus field is */ /* used to represent the driver */ struct driver_context drv_ctx; - struct hv_driver drv_obj; + struct driver_context drv_obj; struct bus_type bus; struct tasklet_struct msg_dpc; @@ -196,7 +196,7 @@ static int vmbus...
2011 Feb 26
1
[PATCH 4/6] Staging: hv: Unify the hyperv driver abstractions
...vice *device); - void (*cleanup)(struct hv_driver *driver); -}; - #endif /* _VMBUS_API_H_ */ diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index a385bd2..3922a07 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -47,7 +47,7 @@ struct vmbus_driver_context { /* The driver field is not used in here. Instead, the bus field is */ /* used to represent the driver */ struct driver_context drv_ctx; - struct hv_driver drv_obj; + struct driver_context drv_obj; struct bus_type bus; struct tasklet_struct msg_dpc; @@ -196,7 +196,7 @@ static int vmbus...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...ort_info { diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 3922a07..c7e8a36 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -41,13 +41,13 @@ #define VMBUS_IRQ_VECTOR IRQ5_VECTOR /* Main vmbus driver data structure */ -struct vmbus_driver_context { +struct vmbus_hyperv_driver { /* !! These must be the first 2 fields !! */ /* FIXME, this is a bug */ /* The driver field is not used in here. Instead, the bus field is */ /* used to represent the driver */ - struct driver_context drv_ctx; - struct driver_context drv_obj; + struct hyperv_...
2011 Feb 26
1
[PATCH 5/6] Staging: hv: Rename driver_context to hyperv_driver
...ort_info { diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 3922a07..c7e8a36 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -41,13 +41,13 @@ #define VMBUS_IRQ_VECTOR IRQ5_VECTOR /* Main vmbus driver data structure */ -struct vmbus_driver_context { +struct vmbus_hyperv_driver { /* !! These must be the first 2 fields !! */ /* FIXME, this is a bug */ /* The driver field is not used in here. Instead, the bus field is */ /* used to represent the driver */ - struct driver_context drv_ctx; - struct driver_context drv_obj; + struct hyperv_...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...scmnd->device, device_ctx); + scmnd->device, device_obj); return ret; } diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 38152df..a385bd2 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -54,7 +54,7 @@ struct vmbus_driver_context { struct tasklet_struct event_dpc; /* The bus root device */ - struct hyperv_device device_ctx; + struct hyperv_device device_obj; }; static int vmbus_match(struct device *device, struct device_driver *driver); @@ -354,12 +354,12 @@ static ssize_t vmbus_show_device_attr(struct device *dev...
2011 Feb 26
2
[PATCH 3/6] Staging: hv: Cleanup hyperv_device variable names
...scmnd->device, device_ctx); + scmnd->device, device_obj); return ret; } diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 38152df..a385bd2 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -54,7 +54,7 @@ struct vmbus_driver_context { struct tasklet_struct event_dpc; /* The bus root device */ - struct hyperv_device device_ctx; + struct hyperv_device device_obj; }; static int vmbus_match(struct device *device, struct device_driver *driver); @@ -354,12 +354,12 @@ static ssize_t vmbus_show_device_attr(struct device *dev...
2011 Mar 10
2
[PATCH 11/21] Staging: hv: Make vmbus driver a platform pci driver
...mbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 8b9394a..e4855ac 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -43,6 +43,8 @@ static struct device *root_dev; /* Root device */ +struct pci_dev *hv_pci_dev; + /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -887,36 +889,24 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) } } -static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = { - { - .ident = "Hyper-V", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), - DMI_MATCH(DMI_PRODUC...
2011 Mar 10
2
[PATCH 11/21] Staging: hv: Make vmbus driver a platform pci driver
...mbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 8b9394a..e4855ac 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -43,6 +43,8 @@ static struct device *root_dev; /* Root device */ +struct pci_dev *hv_pci_dev; + /* Main vmbus driver data structure */ struct vmbus_driver_context { @@ -887,36 +889,24 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) } } -static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = { - { - .ident = "Hyper-V", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), - DMI_MATCH(DMI_PRODUC...