aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-12-01 09:46:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 14:34:36 -0500
commit37f7278b81a9ab9b76cf4d716ba420444ca4a616 (patch)
tree5009a8fe1db5b3e8a88f7d307ddca8b85fc2a912 /drivers/hv
parent29423b7e51a8ea4d687cf98c3a50f33c554be194 (diff)
Drivers: hv: Save and export negotiated vmbus version
Export the negotiated vmbus version as this may be useful for individual drivers. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/connection.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 2b56a3f47b30..70ea5d1fc16c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -30,6 +30,7 @@
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/vmalloc.h> 31#include <linux/vmalloc.h>
32#include <linux/hyperv.h> 32#include <linux/hyperv.h>
33#include <linux/export.h>
33#include <asm/hyperv.h> 34#include <asm/hyperv.h>
34#include "hyperv_vmbus.h" 35#include "hyperv_vmbus.h"
35 36
@@ -54,6 +55,12 @@ struct vmbus_connection vmbus_connection = {
54 55
55#define VERSION_INVAL -1 56#define VERSION_INVAL -1
56 57
58/*
59 * Negotiated protocol version with the host.
60 */
61__u32 vmbus_proto_version;
62EXPORT_SYMBOL_GPL(vmbus_proto_version);
63
57static __u32 vmbus_get_next_version(__u32 current_version) 64static __u32 vmbus_get_next_version(__u32 current_version)
58{ 65{
59 switch (current_version) { 66 switch (current_version) {
@@ -215,6 +222,8 @@ int vmbus_connect(void)
215 if (version == VERSION_INVAL) 222 if (version == VERSION_INVAL)
216 goto cleanup; 223 goto cleanup;
217 224
225 vmbus_proto_version = version;
226 pr_info("Negotiated host information %d\n", version);
218 kfree(msginfo); 227 kfree(msginfo);
219 return 0; 228 return 0;
220 229