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 <[EMAIL PROTECTED]>

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
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to