[openib-general] [PATCH updated] mthca: fix page shift calculation
Michael S. Tsirkin
mst at mellanox.co.il
Wed Jan 4 04:48:29 PST 2006
Sorry, the version I posted previously has broken whitespace.
---
Fix page shift calculation: for all pages except possibly the last one, the byte
beyond the buffer end must be page aligned.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: openib/drivers/infiniband/hw/mthca/mthca_provider.c
===================================================================
--- openib/drivers/infiniband/hw/mthca/mthca_provider.c (revision 4722)
+++ openib/drivers/infiniband/hw/mthca/mthca_provider.c (working copy)
@@ -787,6 +787,8 @@ static struct ib_mr *mthca_reg_phys_mr(s
total_size += buffer_list[i].size;
if (i > 0)
mask |= buffer_list[i].addr;
+ if (i < num_phys_buf - 1)
+ mask |= buffer_list[i].addr + buffer_list[i].size;
}
/* Find largest page shift we can use to cover buffers */
--
MST
More information about the general
mailing list