提交 37f7278b 编写于 作者: K K. Y. Srinivasan 提交者: Greg Kroah-Hartman

Drivers: hv: Save and export negotiated vmbus version

Export the negotiated vmbus version as this may be useful for
individual drivers.
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 29423b7e
......@@ -30,6 +30,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/hyperv.h>
#include <linux/export.h>
#include <asm/hyperv.h>
#include "hyperv_vmbus.h"
......@@ -54,6 +55,12 @@ struct vmbus_connection vmbus_connection = {
#define VERSION_INVAL -1
/*
* Negotiated protocol version with the host.
*/
__u32 vmbus_proto_version;
EXPORT_SYMBOL_GPL(vmbus_proto_version);
static __u32 vmbus_get_next_version(__u32 current_version)
{
switch (current_version) {
......@@ -215,6 +222,8 @@ int vmbus_connect(void)
if (version == VERSION_INVAL)
goto cleanup;
vmbus_proto_version = version;
pr_info("Negotiated host information %d\n", version);
kfree(msginfo);
return 0;
......
......@@ -1204,5 +1204,11 @@ int hv_kvp_init(struct hv_util_service *);
void hv_kvp_deinit(void);
void hv_kvp_onchannelcallback(void *);
/*
* Negotiated version with the Host.
*/
extern __u32 vmbus_proto_version;
#endif /* __KERNEL__ */
#endif /* _HYPERV_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册