From patchwork Tue Dec 2 10:26:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 5419191 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 CADC7BEEA8 for ; Tue, 2 Dec 2014 10:27:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1274E2027D for ; Tue, 2 Dec 2014 10:27:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33B0020295 for ; Tue, 2 Dec 2014 10:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932473AbaLBK1R (ORCPT ); Tue, 2 Dec 2014 05:27:17 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:59274 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754100AbaLBK0h (ORCPT ); Tue, 2 Dec 2014 05:26:37 -0500 Received: by mail-wi0-f176.google.com with SMTP id ex7so27532984wid.3 for ; Tue, 02 Dec 2014 02:26:36 -0800 (PST) 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=SdsJYOoM6KnzgU+dKGg7bdXc4JPBduRnVY3fDp3VMYg=; b=K4UMjyu43aPghPNrD7vKoo+z6gmBgE+JEv2MVmjnBBGqBL3L4UdoOFsMSzvlCGT2XN fvSHVuPns5L/6PlWhRpvPVizCzRrX9wQqhwZ4vVZNhoQhpSwb/p1UjLVu/MlzVYb5ZmV SDaZBbtdpbQ13iaJ+MKpJVj9R48Ure8GXw+LZqOnY6XtF4S5StjVN2ZqrrFA0dHhf9j6 ru5zTr0oF5+Rscu4197M4H3wVCsxic+QUM7gBrBWP9yOYxXcYO2Cj76TuLK7gssnw3j/ AQbxHBPhvCJx8BupTtjP2W60G9oD2uYABxJcpbsZCPwQhOV1zidVm8T2X/zz7oc4ajGS 2D8g== X-Gm-Message-State: ALoCoQkvEIea9Nox5fG9ZSJRhLhomaOyXJmMTaBN9dLPrF5SgJ9tQbrossaJflwwmymvuDQ07PYJ X-Received: by 10.194.92.148 with SMTP id cm20mr103388445wjb.88.1417515996259; Tue, 02 Dec 2014 02:26:36 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id cq4sm31300511wjc.35.2014.12.02.02.26.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Dec 2014 02:26:35 -0800 (PST) From: Eli Cohen X-Google-Original-From: Eli Cohen To: davem@davemloft.net Cc: roland@kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, ogerlitz@mellanox.com, amirv@mellanox.com, Eli Cohen Subject: [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement Date: Tue, 2 Dec 2014 12:26:13 +0200 Message-Id: <1417515979-22418-4-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1417515979-22418-1-git-send-email-eli@mellanox.com> References: <1417515979-22418-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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Command queue descriptor page size is 4KB and not the page size used by the kernel. Signed-off-by: Eli Cohen --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 368c6c5ea014..a2853057c779 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -1363,7 +1363,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev) goto err_map; } - if (cmd->log_sz + cmd->log_stride > PAGE_SHIFT) { + if (cmd->log_sz + cmd->log_stride > MLX5_ADAPTER_PAGE_SHIFT) { dev_err(&dev->pdev->dev, "command queue size overflow\n"); err = -EINVAL; goto err_map;