Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b52a8b7f0aeff5b91921cd53728ac781cdb4cccf
Commit:     b52a8b7f0aeff5b91921cd53728ac781cdb4cccf
Parent:     f761fae1ae1e6e35ae15fce99d225d08d6cff1e7
Author:     Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 21 19:46:57 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Mar 23 01:48:35 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 2449b9f..c89ca3f 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -905,6 +905,14 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct 
myri10ge_rx_buf *rx,
                    (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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to