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 <[EMAIL PROTECTED]>
---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to