aboutsummaryrefslogtreecommitdiffstats
path: root/f3.patch
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-09-01 20:19:13 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-01 20:19:13 -0700
commitcef16096f51a9ff4909f4f5ef5b66310cce15a8b (patch)
tree695e3f791b6dbca07dd3fbe7fb6395962b3c9a6d /f3.patch
parent438da86ccf7b13af517aaa2bf4ff7ddd97debd25 (diff)
downloadpatches-cef16096f51a9ff4909f4f5ef5b66310cce15a8b.tar.gz
more hv patches
Diffstat (limited to 'f3.patch')
-rw-r--r--f3.patch283
1 files changed, 283 insertions, 0 deletions
diff --git a/f3.patch b/f3.patch
new file mode 100644
index 00000000000000..f7c6d7c77ff741
--- /dev/null
+++ b/f3.patch
@@ -0,0 +1,283 @@
+---
+ drivers/staging/hv/vmbus_drv.c | 139 +++++++++++------------------------------
+ 1 file changed, 38 insertions(+), 101 deletions(-)
+
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -1,5 +1,4 @@
+ /*
+- *
+ * Copyright (c) 2009, Microsoft Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+@@ -18,10 +17,7 @@
+ * Authors:
+ * Haiyang Zhang <haiyangz@microsoft.com>
+ * Hank Janssen <hjanssen@microsoft.com>
+- *
+ */
+-
+-
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/device.h>
+@@ -33,35 +29,27 @@
+ #include "vmbus.h"
+
+
+-/* Defines */
+-
+-
+ /* FIXME! We need to do this dynamically for PIC and APIC system */
+-#define VMBUS_IRQ 0x5
+-#define VMBUS_IRQ_VECTOR IRQ5_VECTOR
+-
+-/* Data types */
+-
++#define VMBUS_IRQ 0x5
++#define VMBUS_IRQ_VECTOR IRQ5_VECTOR
+
+ /* Main vmbus driver data structure */
+ struct vmbus_driver_context {
+ /* !! 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_ctx;
+ struct vmbus_driver drv_obj;
+
+- struct bus_type bus;
+- struct tasklet_struct msg_dpc;
+- struct tasklet_struct event_dpc;
++ struct bus_type bus;
++ struct tasklet_struct msg_dpc;
++ struct tasklet_struct event_dpc;
+
+ /* The bus root device */
+- struct device_context device_ctx;
++ struct device_context device_ctx;
+ };
+
+-
+-/* Static decl */
+-
+ 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);
+@@ -914,9 +902,8 @@ static int vmbus_remove(struct device *c
+ return 0;
+ }
+
+-/*++
+-
+-Name: vmbus_shutdown()
++/**
++ * vmbus_shutdown
+
+ Desc: Shutdown a vmbus device
+
+@@ -928,16 +915,17 @@ static void vmbus_shutdown(struct device
+ DPRINT_ENTER(VMBUS_DRV);
+
+ /* Special case root bus device */
+- if (child_device->parent == NULL)
+- {
+- /* No-op since it is statically defined and handle in vmbus_bus_exit() */
++ if (child_device->parent == NULL) {
++ /*
++ * No-op since it is statically defined and handle in
++ * vmbus_bus_exit()
++ */
+ DPRINT_EXIT(VMBUS_DRV);
+ return;
+ }
+
+ /* The device may not be attached yet */
+- if (!child_device->driver)
+- {
++ if (!child_device->driver) {
+ DPRINT_EXIT(VMBUS_DRV);
+ return;
+ }
+@@ -955,13 +943,9 @@ static void vmbus_shutdown(struct device
+ return;
+ }
+
+-/*++
+-
+-Name: vmbus_bus_release()
+-
+-Desc: Final callback release of the vmbus root device
+-
+---*/
++/**
++ * vmbus_bus_release - Final callback release of the vmbus root device
++ */
+ static void vmbus_bus_release(struct device *device)
+ {
+ DPRINT_ENTER(VMBUS_DRV);
+@@ -973,13 +957,9 @@ static void vmbus_bus_release(struct dev
+ DPRINT_EXIT(VMBUS_DRV);
+ }
+
+-/*++
+-
+-Name: vmbus_device_release()
+-
+-Desc: Final callback release of the vmbus child device
+-
+---*/
++/**
++ * vmbus_device_release - Final callback release of the vmbus child device
++ */
+ static void vmbus_device_release(struct device *device)
+ {
+ struct device_context *device_ctx = device_to_device_context(device);
+@@ -990,19 +970,14 @@ static void vmbus_device_release(struct
+ kfree(device_ctx);
+
+ /* !!DO NOT REFERENCE device_ctx anymore at this point!! */
+-
+ DPRINT_EXIT(VMBUS_DRV);
+
+ return;
+ }
+
+-/*++
+-
+-Name: vmbus_msg_dpc()
+-
+-Desc: Tasklet routine to handle hypervisor messages
+-
+---*/
++/**
++ * vmbus_msg_dpc - Tasklet routine to handle hypervisor messages
++ */
+ static void vmbus_msg_dpc(unsigned long data)
+ {
+ struct vmbus_driver *vmbus_drv_obj = (struct vmbus_driver *)data;
+@@ -1017,13 +992,9 @@ static void vmbus_msg_dpc(unsigned long
+ DPRINT_EXIT(VMBUS_DRV);
+ }
+
+-/*++
+-
+-Name: vmbus_msg_dpc()
+-
+-Desc: Tasklet routine to handle hypervisor events
+-
+---*/
++/**
++ * vmbus_msg_dpc - Tasklet routine to handle hypervisor events
++ */
+ static void vmbus_event_dpc(unsigned long data)
+ {
+ struct vmbus_driver *vmbus_drv_obj = (struct vmbus_driver *)data;
+@@ -1038,17 +1009,10 @@ static void vmbus_event_dpc(unsigned lon
+ DPRINT_EXIT(VMBUS_DRV);
+ }
+
+-/*++
+-
+-Name: vmbus_msg_dpc()
+-
+-Desc: ISR routine
+-
+---*/
+-static irqreturn_t vmbus_isr(int irq, void* dev_id)
++static irqreturn_t vmbus_isr(int irq, void *dev_id)
+ {
+- int ret=0;
+ struct vmbus_driver *vmbus_driver_obj = &g_vmbus_drv.drv_obj;
++ int ret;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -1058,48 +1022,31 @@ static irqreturn_t vmbus_isr(int irq, vo
+ ret = vmbus_driver_obj->OnIsr(&vmbus_driver_obj->Base);
+
+ /* Schedules a dpc if necessary */
+- if (ret > 0)
+- {
+- if (test_bit(0, (unsigned long*)&ret))
+- {
++ if (ret > 0) {
++ if (test_bit(0, (unsigned long *)&ret))
+ tasklet_schedule(&g_vmbus_drv.msg_dpc);
+- }
+
+- if (test_bit(1, (unsigned long*)&ret))
+- {
++ if (test_bit(1, (unsigned long *)&ret))
+ tasklet_schedule(&g_vmbus_drv.event_dpc);
+- }
+
+ DPRINT_EXIT(VMBUS_DRV);
+ return IRQ_HANDLED;
+- }
+- else
+- {
++ } else {
+ DPRINT_EXIT(VMBUS_DRV);
+ return IRQ_NONE;
+ }
+ }
+
+-MODULE_LICENSE("GPL");
+-
+-
+-/*++
+-
+-Name: vmbus_init()
+-
+-Desc: Main vmbus driver entry routine
+-
+---*/
+ static int __init vmbus_init(void)
+ {
+- int ret=0;
++ int ret = 0;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+ DPRINT_INFO(VMBUS_DRV,
+ "Vmbus initializing.... current log level 0x%x (%x,%x)",
+ vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel));
+-/* Todo: it is used for loglevel, to be ported to new kernel. */
++ /* Todo: it is used for loglevel, to be ported to new kernel. */
+
+ ret = vmbus_bus_init(VmbusInitialize);
+
+@@ -1107,29 +1054,19 @@ static int __init vmbus_init(void)
+ return ret;
+ }
+
+-
+-
+-/*++
+-
+-Name: vmbus_init()
+-
+-Desc: Main vmbus driver exit routine
+-
+---*/
+ static void __exit vmbus_exit(void)
+ {
+ DPRINT_ENTER(VMBUS_DRV);
+
+ vmbus_bus_exit();
+-/* Todo: it is used for loglevel, to be ported to new kernel. */
++ /* Todo: it is used for loglevel, to be ported to new kernel. */
+ DPRINT_EXIT(VMBUS_DRV);
+-
+ return;
+ }
+
++MODULE_LICENSE("GPL");
+ module_param(vmbus_irq, int, S_IRUGO);
+ module_param(vmbus_loglevel, int, S_IRUGO);
+
+ module_init(vmbus_init);
+ module_exit(vmbus_exit);
+-/* eof */