]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[MTHCA] bugfix: CQ ring buffer size must be PAGE_SIZE aligned
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Apr 2006 10:14:49 +0000 (10:14 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Apr 2006 10:14:49 +0000 (10:14 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@286 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/hw/mthca/kernel/mthca_cq.c

index e3753e4ed43ab2ffa9ce00f85a01db6c0a5e34b7..a3805308dc062b196c45cbed2618f7a99bf08180 100644 (file)
@@ -733,7 +733,7 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
                  struct mthca_ucontext *ctx, u32 pdn,
                  struct mthca_cq *cq)
 {
-       int size = nent * MTHCA_CQ_ENTRY_SIZE;
+       int size = NEXT_PAGE_ALIGN(nent * MTHCA_CQ_ENTRY_SIZE );
        struct mthca_mailbox *mailbox;
        struct mthca_cq_context *cq_context;
        int err = -ENOMEM;