From patchwork Thu Oct 31 13:26:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3120541 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A384FBF924 for ; Thu, 31 Oct 2013 13:27:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DDEE20460 for ; Thu, 31 Oct 2013 13:27:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7862F203AC for ; Thu, 31 Oct 2013 13:27:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754344Ab3JaN1G (ORCPT ); Thu, 31 Oct 2013 09:27:06 -0400 Received: from mail-ee0-f43.google.com ([74.125.83.43]:44148 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754339Ab3JaN1F (ORCPT ); Thu, 31 Oct 2013 09:27:05 -0400 Received: by mail-ee0-f43.google.com with SMTP id b47so1350548eek.2 for ; Thu, 31 Oct 2013 06:27:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V2vTTcik5VDqOwafDmCc01As/8w0jXm07l7VHR6yPXU=; b=ev14uT7idr+MamnNSAArSN0IRPwsaorcfDqphAIbukChY4rY1opbt64rtIDLbe+d18 ESr3vrgLN7PmTAwqeVjbaJjJLL+d6x4THmqIWST6HHn311SWE2S99GsFPXs1VKHneiTs smXRcT6DiaR0EAL+FRYrWXv0HnCsxwPpV52NfvgYFgbl6tNwDxYGo9iT1jVXhompNXhO 0nXPBDyCOXsfymTmjGrDFYZmiGHTDCLPJ24SyaV3auU744JR4m3h9qpno9zr4fygAIJG uCcD2CdPhRCNrdCXnOMJQ9HEQ1S0ylCBYjJi6zG8rQDzR1D07mXeu/xmyh5QIcQN70L+ yxMA== X-Gm-Message-State: ALoCoQmGEGmS+cV7D7x2WSc0Cvxm4fXk39JX5iSF4yuJ6iTzObbPom5tKziBJaFO5Ym51txf7yHt X-Received: by 10.15.48.135 with SMTP id h7mr3269360eew.78.1383226024708; Thu, 31 Oct 2013 06:27:04 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id bn13sm8553848eeb.11.2013.10.31.06.27.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Oct 2013 06:27:04 -0700 (PDT) From: Eli Cohen To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, amirv@mellanox.com, ogerlitz@mellanox.com, yevgenyp@mellanox.com, Eli Cohen Subject: [PATCH for-next 6/6] IB/mlx5: Fix page shift in create CQ for userspace Date: Thu, 31 Oct 2013 15:26:36 +0200 Message-Id: <1383225996-14828-7-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1383225996-14828-1-git-send-email-eli@mellanox.com> References: <1383225996-14828-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When creating a CQ, we must use mlx5 adapter page shift. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index 2834477..b726274 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -556,7 +556,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata, goto err_db; } mlx5_ib_populate_pas(dev, cq->buf.umem, page_shift, (*cqb)->pas, 0); - (*cqb)->ctx.log_pg_sz = page_shift - PAGE_SHIFT; + (*cqb)->ctx.log_pg_sz = page_shift - MLX5_ADAPTER_PAGE_SHIFT; *index = to_mucontext(context)->uuari.uars[0].index;