Drivers: hv: Log the negotiated IC versions.
authorAlex Ng <alexng@messages.microsoft.com>
Sat, 28 Jan 2017 19:37:18 +0000 (12:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2017 10:05:59 +0000 (11:05 +0100)
Log the negotiated IC versions.

Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_fcopy.c
drivers/hv/hv_kvp.c
drivers/hv/hv_snapshot.c
drivers/hv/hv_util.c

index 0a315e6aa589f31bc0780b7ee1a5b0b63cb8bf6d..9aee6014339dffc8627d173446e7bfe0dc06247c 100644 (file)
@@ -251,10 +251,15 @@ void hv_fcopy_onchannelcallback(void *context)
        icmsghdr = (struct icmsg_hdr *)&recv_buffer[
                        sizeof(struct vmbuspipe_hdr)];
        if (icmsghdr->icmsgtype == ICMSGTYPE_NEGOTIATE) {
-               vmbus_prep_negotiate_resp(icmsghdr, recv_buffer,
+               if (vmbus_prep_negotiate_resp(icmsghdr, recv_buffer,
                                fw_versions, FW_VER_COUNT,
                                fcopy_versions, FCOPY_VER_COUNT,
-                               NULL, &fcopy_srv_version);
+                               NULL, &fcopy_srv_version)) {
+
+                       pr_info("FCopy IC version %d.%d\n",
+                               fcopy_srv_version >> 16,
+                               fcopy_srv_version & 0xFFFF);
+               }
        } else {
                fcopy_msg = (struct hv_fcopy_hdr *)&recv_buffer[
                                sizeof(struct vmbuspipe_hdr) +
index 2cc670442f6c396dd3fd573e1c3da2ab4789d9bc..de263712e247c2b8c47f450f3d1b7eb387f1e073 100644 (file)
@@ -651,10 +651,14 @@ void hv_kvp_onchannelcallback(void *context)
                        sizeof(struct vmbuspipe_hdr)];
 
                if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
-                       vmbus_prep_negotiate_resp(icmsghdrp,
+                       if (vmbus_prep_negotiate_resp(icmsghdrp,
                                 recv_buffer, fw_versions, FW_VER_COUNT,
                                 kvp_versions, KVP_VER_COUNT,
-                                NULL, &kvp_srv_version);
+                                NULL, &kvp_srv_version)) {
+                               pr_info("KVP IC version %d.%d\n",
+                                       kvp_srv_version >> 16,
+                                       kvp_srv_version & 0xFFFF);
+                       }
                } else {
                        kvp_msg = (struct hv_kvp_msg *)&recv_buffer[
                                sizeof(struct vmbuspipe_hdr) +
index d14f10b924a0aba355f743784160369efe81080e..bcc03f0748d61cd5a8c9f31447b77fd8b2e7e13b 100644 (file)
@@ -304,7 +304,7 @@ void hv_vss_onchannelcallback(void *context)
        u32 recvlen;
        u64 requestid;
        struct hv_vss_msg *vss_msg;
-
+       int vss_srv_version;
 
        struct icmsg_hdr *icmsghdrp;
 
@@ -319,10 +319,15 @@ void hv_vss_onchannelcallback(void *context)
                        sizeof(struct vmbuspipe_hdr)];
 
                if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
-                       vmbus_prep_negotiate_resp(icmsghdrp,
+                       if (vmbus_prep_negotiate_resp(icmsghdrp,
                                 recv_buffer, fw_versions, FW_VER_COUNT,
                                 vss_versions, VSS_VER_COUNT,
-                                NULL, NULL);
+                                NULL, &vss_srv_version)) {
+
+                               pr_info("VSS IC version %d.%d\n",
+                                       vss_srv_version >> 16,
+                                       vss_srv_version & 0xFFFF);
+                       }
                } else {
                        vss_msg = (struct hv_vss_msg *)&recv_buffer[
                                sizeof(struct vmbuspipe_hdr) +
index 891537ae579fa7174a87bb5c021f0f349ba51795..d42ede78a9dd62d9a7385040564c29cc6446c515 100644 (file)
@@ -295,7 +295,7 @@ static void timesync_onchannelcallback(void *context)
                                                fw_versions, FW_VER_COUNT,
                                                ts_versions, TS_VER_COUNT,
                                                NULL, &ts_srv_version)) {
-                               pr_info("TimeSync version %d.%d\n",
+                               pr_info("TimeSync IC version %d.%d\n",
                                        ts_srv_version >> 16,
                                        ts_srv_version & 0xFFFF);
                        }
@@ -361,7 +361,7 @@ static void heartbeat_onchannelcallback(void *context)
                                        hb_versions, HB_VER_COUNT,
                                        NULL, &hb_srv_version)) {
 
-                               pr_info("Heartbeat version %d.%d\n",
+                               pr_info("Heartbeat IC version %d.%d\n",
                                        hb_srv_version >> 16,
                                        hb_srv_version & 0xFFFF);
                        }