aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2013-07-17 20:27:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 19:40:42 -0400
commit20138d6cb838aa01bb1b382dcb5f3d3a119ff2cb (patch)
tree99f41151cd9a130cecead505c27ed01139f4493e /drivers/hv
parent6741335bc7294548ac95cb1f4671991ff30da193 (diff)
Drivers: hv: balloon: Initialize the transaction ID just before sending the packet
Each message sent from the guest carries with it a transaction ID. Assign the transaction ID just before putting the message on the VMBUS. This would help in debugging on the host side. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv_balloon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 4c605c70ebf9..8dd08c029da2 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -828,7 +828,6 @@ static void hot_add_req(struct work_struct *dummy)
828 memset(&resp, 0, sizeof(struct dm_hot_add_response)); 828 memset(&resp, 0, sizeof(struct dm_hot_add_response));
829 resp.hdr.type = DM_MEM_HOT_ADD_RESPONSE; 829 resp.hdr.type = DM_MEM_HOT_ADD_RESPONSE;
830 resp.hdr.size = sizeof(struct dm_hot_add_response); 830 resp.hdr.size = sizeof(struct dm_hot_add_response);
831 resp.hdr.trans_id = atomic_inc_return(&trans_id);
832 831
833#ifdef CONFIG_MEMORY_HOTPLUG 832#ifdef CONFIG_MEMORY_HOTPLUG
834 pg_start = dm->ha_wrk.ha_page_range.finfo.start_page; 833 pg_start = dm->ha_wrk.ha_page_range.finfo.start_page;
@@ -890,6 +889,7 @@ static void hot_add_req(struct work_struct *dummy)
890 pr_info("Memory hot add failed\n"); 889 pr_info("Memory hot add failed\n");
891 890
892 dm->state = DM_INITIALIZED; 891 dm->state = DM_INITIALIZED;
892 resp.hdr.trans_id = atomic_inc_return(&trans_id);
893 vmbus_sendpacket(dm->dev->channel, &resp, 893 vmbus_sendpacket(dm->dev->channel, &resp,
894 sizeof(struct dm_hot_add_response), 894 sizeof(struct dm_hot_add_response),
895 (unsigned long)NULL, 895 (unsigned long)NULL,
@@ -1076,7 +1076,6 @@ static void balloon_up(struct work_struct *dummy)
1076 bl_resp = (struct dm_balloon_response *)send_buffer; 1076 bl_resp = (struct dm_balloon_response *)send_buffer;
1077 memset(send_buffer, 0, PAGE_SIZE); 1077 memset(send_buffer, 0, PAGE_SIZE);
1078 bl_resp->hdr.type = DM_BALLOON_RESPONSE; 1078 bl_resp->hdr.type = DM_BALLOON_RESPONSE;
1079 bl_resp->hdr.trans_id = atomic_inc_return(&trans_id);
1080 bl_resp->hdr.size = sizeof(struct dm_balloon_response); 1079 bl_resp->hdr.size = sizeof(struct dm_balloon_response);
1081 bl_resp->more_pages = 1; 1080 bl_resp->more_pages = 1;
1082 1081
@@ -1104,6 +1103,7 @@ static void balloon_up(struct work_struct *dummy)
1104 */ 1103 */
1105 1104
1106 do { 1105 do {
1106 bl_resp->hdr.trans_id = atomic_inc_return(&trans_id);
1107 ret = vmbus_sendpacket(dm_device.dev->channel, 1107 ret = vmbus_sendpacket(dm_device.dev->channel,
1108 bl_resp, 1108 bl_resp,
1109 bl_resp->hdr.size, 1109 bl_resp->hdr.size,