Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328432
b: refs/heads/master
c: 99e3fcf
h: refs/heads/master
v: v3
  • Loading branch information
Haiyang Zhang authored and David S. Miller committed Oct 2, 2012
1 parent 5ab4a88 commit 6efed4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: ea4963745f712a746ccb45871a22e0814141a891
refs/heads/master: 99e3fcfa34e7ea6dbb44fe5df51b79ccb6f73d3d
15 changes: 14 additions & 1 deletion trunk/drivers/net/hyperv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ struct rndis_request {

/* Simplify allocation by having a netvsc packet inline */
struct hv_netvsc_packet pkt;
struct hv_page_buffer buf;
/* Set 2 pages for rndis requests crossing page boundary */
struct hv_page_buffer buf[2];

struct rndis_message request_msg;
/*
Expand Down Expand Up @@ -227,6 +228,18 @@ static int rndis_filter_send_request(struct rndis_device *dev,
packet->page_buf[0].offset =
(unsigned long)&req->request_msg & (PAGE_SIZE - 1);

/* Add one page_buf when request_msg crossing page boundary */
if (packet->page_buf[0].offset + packet->page_buf[0].len > PAGE_SIZE) {
packet->page_buf_cnt++;
packet->page_buf[0].len = PAGE_SIZE -
packet->page_buf[0].offset;
packet->page_buf[1].pfn = virt_to_phys((void *)&req->request_msg
+ packet->page_buf[0].len) >> PAGE_SHIFT;
packet->page_buf[1].offset = 0;
packet->page_buf[1].len = req->request_msg.msg_len -
packet->page_buf[0].len;
}

packet->completion.send.send_completion_ctx = req;/* packet; */
packet->completion.send.send_completion =
rndis_filter_send_request_completion;
Expand Down

0 comments on commit 6efed4d

Please sign in to comment.