aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2014-12-19 21:25:18 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-22 16:11:11 -0500
commitc51ed18257e731e15541324cd58bd3761d9d3b1c (patch)
tree5760efa7e3bf0d0cd991176290017dfb39fc02a6 /drivers/net/hyperv
parent8acdf999accfd95093db17f33a58429a38782060 (diff)
hyperv: Fix some variable name typos in send-buffer init/revoke
The changed names are union fields with the same size, so the existing code still works. But, we now update these variables to the correct names. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r--drivers/net/hyperv/hyperv_net.h1
-rw-r--r--drivers/net/hyperv/netvsc.c15
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 2f48f790c9b4..384ca4f4de4a 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -590,6 +590,7 @@ struct nvsp_message {
590 590
591 591
592#define NETVSC_RECEIVE_BUFFER_ID 0xcafe 592#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
593#define NETVSC_SEND_BUFFER_ID 0
593 594
594#define NETVSC_PACKET_SIZE 4096 595#define NETVSC_PACKET_SIZE 4096
595 596
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index dd867e6cabd6..9f49c0129a78 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -161,8 +161,8 @@ static int netvsc_destroy_buf(struct netvsc_device *net_device)
161 161
162 /* Deal with the send buffer we may have setup. 162 /* Deal with the send buffer we may have setup.
163 * If we got a send section size, it means we received a 163 * If we got a send section size, it means we received a
164 * SendsendBufferComplete msg (ie sent 164 * NVSP_MSG1_TYPE_SEND_SEND_BUF_COMPLETE msg (ie sent
165 * NvspMessage1TypeSendReceiveBuffer msg) therefore, we need 165 * NVSP_MSG1_TYPE_SEND_SEND_BUF msg) therefore, we need
166 * to send a revoke msg here 166 * to send a revoke msg here
167 */ 167 */
168 if (net_device->send_section_size) { 168 if (net_device->send_section_size) {
@@ -172,7 +172,8 @@ static int netvsc_destroy_buf(struct netvsc_device *net_device)
172 172
173 revoke_packet->hdr.msg_type = 173 revoke_packet->hdr.msg_type =
174 NVSP_MSG1_TYPE_REVOKE_SEND_BUF; 174 NVSP_MSG1_TYPE_REVOKE_SEND_BUF;
175 revoke_packet->msg.v1_msg.revoke_recv_buf.id = 0; 175 revoke_packet->msg.v1_msg.revoke_send_buf.id =
176 NETVSC_SEND_BUFFER_ID;
176 177
177 ret = vmbus_sendpacket(net_device->dev->channel, 178 ret = vmbus_sendpacket(net_device->dev->channel,
178 revoke_packet, 179 revoke_packet,
@@ -204,7 +205,7 @@ static int netvsc_destroy_buf(struct netvsc_device *net_device)
204 net_device->send_buf_gpadl_handle = 0; 205 net_device->send_buf_gpadl_handle = 0;
205 } 206 }
206 if (net_device->send_buf) { 207 if (net_device->send_buf) {
207 /* Free up the receive buffer */ 208 /* Free up the send buffer */
208 vfree(net_device->send_buf); 209 vfree(net_device->send_buf);
209 net_device->send_buf = NULL; 210 net_device->send_buf = NULL;
210 } 211 }
@@ -339,9 +340,9 @@ static int netvsc_init_buf(struct hv_device *device)
339 init_packet = &net_device->channel_init_pkt; 340 init_packet = &net_device->channel_init_pkt;
340 memset(init_packet, 0, sizeof(struct nvsp_message)); 341 memset(init_packet, 0, sizeof(struct nvsp_message));
341 init_packet->hdr.msg_type = NVSP_MSG1_TYPE_SEND_SEND_BUF; 342 init_packet->hdr.msg_type = NVSP_MSG1_TYPE_SEND_SEND_BUF;
342 init_packet->msg.v1_msg.send_recv_buf.gpadl_handle = 343 init_packet->msg.v1_msg.send_send_buf.gpadl_handle =
343 net_device->send_buf_gpadl_handle; 344 net_device->send_buf_gpadl_handle;
344 init_packet->msg.v1_msg.send_recv_buf.id = 0; 345 init_packet->msg.v1_msg.send_send_buf.id = NETVSC_SEND_BUFFER_ID;
345 346
346 /* Send the gpadl notification request */ 347 /* Send the gpadl notification request */
347 ret = vmbus_sendpacket(device->channel, init_packet, 348 ret = vmbus_sendpacket(device->channel, init_packet,
@@ -364,7 +365,7 @@ static int netvsc_init_buf(struct hv_device *device)
364 netdev_err(ndev, "Unable to complete send buffer " 365 netdev_err(ndev, "Unable to complete send buffer "
365 "initialization with NetVsp - status %d\n", 366 "initialization with NetVsp - status %d\n",
366 init_packet->msg.v1_msg. 367 init_packet->msg.v1_msg.
367 send_recv_buf_complete.status); 368 send_send_buf_complete.status);
368 ret = -EINVAL; 369 ret = -EINVAL;
369 goto cleanup; 370 goto cleanup;
370 } 371 }