[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46017DA1.2050500@myri.com>
Date: Wed, 21 Mar 2007 19:46:57 +0100
From: Brice Goglin <brice@...i.com>
To: Jeff Garzik <jeff@...zik.org>
CC: netdev@...r.kernel.org
Subject: [PATCH 3/4] myri10ge: fix management of >4kB allocated pages
Fix management of allocated physical pages when the architecture
page size is not 4kB since the firmware cannot cross 4K boundary.
Signed-off-by: Brice Goglin <brice@...i.com>
---
drivers/net/myri10ge/myri10ge.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-03-18 21:14:23.000000000 +0100
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-03-21 19:30:38.000000000 +0100
@@ -905,6 +905,14 @@
(rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE)) {
/* we can use part of previous page */
get_page(rx->page);
+#if MYRI10GE_ALLOC_SIZE > 4096
+ /* Firmware cannot cross 4K boundary.. */
+ if ((rx->page_offset >> 12) !=
+ ((rx->page_offset + bytes - 1) >> 12)) {
+ rx->page_offset =
+ (rx->page_offset + bytes) & ~4095;
+ }
+#endif
} else {
/* we need a new page */
page =
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists