mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
29423b7e51
commit
37f7278b81
2 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue