diff options
Diffstat (limited to 'drivers/hv/connection.c')
| -rw-r--r-- | drivers/hv/connection.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index af6edf9b1936..f2d7bf90c9fe 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
| @@ -67,7 +67,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
| 67 | int ret = 0; | 67 | int ret = 0; |
| 68 | struct vmbus_channel_initiate_contact *msg; | 68 | struct vmbus_channel_initiate_contact *msg; |
| 69 | unsigned long flags; | 69 | unsigned long flags; |
| 70 | int t; | ||
| 71 | 70 | ||
| 72 | init_completion(&msginfo->waitevent); | 71 | init_completion(&msginfo->waitevent); |
| 73 | 72 | ||
| @@ -78,6 +77,8 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
| 78 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); | 77 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); |
| 79 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); | 78 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); |
| 80 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); | 79 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); |
| 80 | if (version == VERSION_WIN8) | ||
| 81 | msg->target_vcpu = hv_context.vp_index[smp_processor_id()]; | ||
| 81 | 82 | ||
| 82 | /* | 83 | /* |
| 83 | * Add to list before we send the request since we may | 84 | * Add to list before we send the request since we may |
| @@ -100,15 +101,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
| 100 | } | 101 | } |
| 101 | 102 | ||
| 102 | /* Wait for the connection response */ | 103 | /* Wait for the connection response */ |
| 103 | t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ); | 104 | wait_for_completion(&msginfo->waitevent); |
| 104 | if (t == 0) { | ||
| 105 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, | ||
| 106 | flags); | ||
| 107 | list_del(&msginfo->msglistentry); | ||
| 108 | spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, | ||
| 109 | flags); | ||
| 110 | return -ETIMEDOUT; | ||
| 111 | } | ||
| 112 | 105 | ||
| 113 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); | 106 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); |
| 114 | list_del(&msginfo->msglistentry); | 107 | list_del(&msginfo->msglistentry); |
