Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362393
b: refs/heads/master
c: f1ea3cd
h: refs/heads/master
i:
  362391: 1cf1a7c
v: v3
  • Loading branch information
Haiyang Zhang authored and David S. Miller committed Apr 8, 2013
1 parent c2d41a4 commit 9874c31
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd5c07a8d6a10c7112b19f3b0d428627c62b06ab
refs/heads/master: f1ea3cd70110d482ef1ce6ef158df113aa366f43
17 changes: 12 additions & 5 deletions trunk/drivers/net/hyperv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,10 @@ static void netvsc_send_completion(struct hv_device *device,
packet->trans_id;

/* Notify the layer above us */
nvsc_packet->completion.send.send_completion(
nvsc_packet->completion.send.send_completion_ctx);
if (nvsc_packet)
nvsc_packet->completion.send.send_completion(
nvsc_packet->completion.send.
send_completion_ctx);

num_outstanding_sends =
atomic_dec_return(&net_device->num_outstanding_sends);
Expand All @@ -498,6 +500,7 @@ int netvsc_send(struct hv_device *device,
int ret = 0;
struct nvsp_message sendMessage;
struct net_device *ndev;
u64 req_id;

net_device = get_outbound_net_device(device);
if (!net_device)
Expand All @@ -518,20 +521,24 @@ int netvsc_send(struct hv_device *device,
0xFFFFFFFF;
sendMessage.msg.v1_msg.send_rndis_pkt.send_buf_section_size = 0;

if (packet->completion.send.send_completion)
req_id = (u64)packet;
else
req_id = 0;

if (packet->page_buf_cnt) {
ret = vmbus_sendpacket_pagebuffer(device->channel,
packet->page_buf,
packet->page_buf_cnt,
&sendMessage,
sizeof(struct nvsp_message),
(unsigned long)packet);
req_id);
} else {
ret = vmbus_sendpacket(device->channel, &sendMessage,
sizeof(struct nvsp_message),
(unsigned long)packet,
req_id,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);

}

if (ret == 0) {
Expand Down
14 changes: 1 addition & 13 deletions trunk/drivers/net/hyperv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ struct rndis_request {

static void rndis_filter_send_completion(void *ctx);

static void rndis_filter_send_request_completion(void *ctx);



static struct rndis_device *get_rndis_device(void)
{
Expand Down Expand Up @@ -241,10 +238,7 @@ static int rndis_filter_send_request(struct rndis_device *dev,
packet->page_buf[0].len;
}

packet->completion.send.send_completion_ctx = req;/* packet; */
packet->completion.send.send_completion =
rndis_filter_send_request_completion;
packet->completion.send.send_completion_tid = (unsigned long)dev;
packet->completion.send.send_completion = NULL;

ret = netvsc_send(dev->net_dev->dev, packet);
return ret;
Expand Down Expand Up @@ -999,9 +993,3 @@ static void rndis_filter_send_completion(void *ctx)
/* Pass it back to the original handler */
filter_pkt->completion(filter_pkt->completion_ctx);
}


static void rndis_filter_send_request_completion(void *ctx)
{
/* Noop */
}

0 comments on commit 9874c31

Please sign in to comment.