According to RNDIS specs, Windows sets this size to
0x4000. I use the same value here.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/rndis_filter.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
Return ETIMEDOUT when the reply message is not received in time.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/rndis_filter.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
@@ -641,6 +641,7 @@ int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter)if(t==0){netdev_err(ndev,"timeout before we got a set response...\n");+ret=-ETIMEDOUT;/**Wecan'tdeallocatetherequestsincewemaystillreceivea*sendcompletionforit.
@@ -45,7 +45,9 @@ struct rndis_request {/* Simplify allocation by having a netvsc packet inline */structhv_netvsc_packetpkt;-structhv_page_bufferbuf;+/* Set 2 pages for rndis requests crossing page boundary */+structhv_page_bufferbuf[2];+/* FIXME: We assumed a fixed size request here. */structrndis_messagerequest_msg;u8ext[100];
@@ -221,6 +223,18 @@ static int rndis_filter_send_request(struct rndis_device *dev,packet->page_buf[0].offset=(unsignedlong)&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;
From: David Miller [davem@davemloft.net]
Sent: Monday, October 01, 2012 6:39 PM
To: Haiyang Zhang
Cc: netdev@vger.kernel.org; KY Srinivasan; olaf@aepfle.de; jasowang@redhat.com; linux-kernel@vger.kernel.org; devel@linuxdriverproject.org
Subject: Re: [PATCH net,1/3] hyperv: Fix the max_xfer_size in RNDIS initialization
These patches do not apply cleanly to the current net-next tree
which is the only place where patches should be targetted right
now.
I will rebase the patch set to the net-next tree soon.
Thanks,
- Haiyang