tree 251b5d362db0e598aef0f47193922a39af1e1773
parent 3fba231754eef768f6ca83900b726ecf4bc9dc5f
author Michael S. Tsirkin <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:16 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:16 -0700

[PATCH] IB/mthca: allow unaligned memory regions

The first buffer of a memory region is not required to be page-aligned, so
don't return an error if it's not.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 infiniband/hw/mthca/mthca_provider.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: drivers/infiniband/hw/mthca/mthca_provider.c
===================================================================
--- 
21db9238e859232257294b75e541737ee123e270/drivers/infiniband/hw/mthca/mthca_provider.c
  (mode:100644 sha1:132fcb854c1a8487d8015cea8e53c6001f44c547)
+++ 
251b5d362db0e598aef0f47193922a39af1e1773/drivers/infiniband/hw/mthca/mthca_provider.c
  (mode:100644 sha1:293c69b1e48f6b657297f220c9869c279ca4e886)
@@ -494,7 +494,7 @@
        mask = 0;
        total_size = 0;
        for (i = 0; i < num_phys_buf; ++i) {
-               if (buffer_list[i].addr & ~PAGE_MASK)
+               if (i != 0 && buffer_list[i].addr & ~PAGE_MASK)
                        return ERR_PTR(-EINVAL);
                if (i != 0 && i != num_phys_buf - 1 &&
                    (buffer_list[i].size & ~PAGE_MASK))
-
To unsubscribe from this list: send the line "unsubscribe bk-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