aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/myri10ge/myri10ge.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index aae2ddb5d827..676c513e12fc 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -77,7 +77,7 @@
77#include "myri10ge_mcp.h" 77#include "myri10ge_mcp.h"
78#include "myri10ge_mcp_gen_header.h" 78#include "myri10ge_mcp_gen_header.h"
79 79
80#define MYRI10GE_VERSION_STR "1.5.1-1.453" 80#define MYRI10GE_VERSION_STR "1.5.2-1.459"
81 81
82MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 82MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
83MODULE_AUTHOR("Maintainer: help@myri.com"); 83MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1200,6 +1200,9 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
1200{ 1200{
1201 struct page *page; 1201 struct page *page;
1202 int idx; 1202 int idx;
1203#if MYRI10GE_ALLOC_SIZE > 4096
1204 int end_offset;
1205#endif
1203 1206
1204 if (unlikely(rx->watchdog_needed && !watchdog)) 1207 if (unlikely(rx->watchdog_needed && !watchdog))
1205 return; 1208 return;
@@ -1241,9 +1244,9 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
1241 1244
1242#if MYRI10GE_ALLOC_SIZE > 4096 1245#if MYRI10GE_ALLOC_SIZE > 4096
1243 /* don't cross a 4KB boundary */ 1246 /* don't cross a 4KB boundary */
1244 if ((rx->page_offset >> 12) != 1247 end_offset = rx->page_offset + bytes - 1;
1245 ((rx->page_offset + bytes - 1) >> 12)) 1248 if ((unsigned)(rx->page_offset ^ end_offset) > 4095)
1246 rx->page_offset = (rx->page_offset + 4096) & ~4095; 1249 rx->page_offset = end_offset & ~4095;
1247#endif 1250#endif
1248 rx->fill_cnt++; 1251 rx->fill_cnt++;
1249 1252