netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eli Cohen <eli@dev.mellanox.co.il>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, clsoto@us.ibm.com, ogerlitz@mellanox.com
Subject: [PATCH net] net/mlx5_core: Fix configuration of log_uar_page_sz
Date: Wed, 11 Feb 2015 16:40:38 +0200	[thread overview]
Message-ID: <20150211144038.GA18543@mtldesk30> (raw)

The current code failed to configure the page size for architectures with page
size different than 4K - PPC for example.

Signed-off-by: Carol L Soto <clsoto@us.ibm.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
---

Hi Dave,

this patch fixes a problem in powerpc with 64K page size

Eli

 drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 3a85904932e7..52d3afd6d548 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -290,6 +290,7 @@ static void copy_rw_fields(void *to, struct mlx5_caps *from)
 	MLX5_SET(cmd_hca_cap, to, log_max_ra_req_dc, from->gen.log_max_ra_req_dc);
 	MLX5_SET(cmd_hca_cap, to, log_max_ra_res_dc, from->gen.log_max_ra_res_dc);
 	MLX5_SET(cmd_hca_cap, to, pkey_table_size, to_fw_pkey_sz(from->gen.pkey_table_size));
+	MLX5_SET(cmd_hca_cap, to, log_uar_page_sz, PAGE_SHIFT - 12);
 	v64 = from->gen.flags & MLX5_CAP_BITS_RW_MASK;
 	*flags_off = cpu_to_be64(v64);
 }
-- 
2.3.0

             reply	other threads:[~2015-02-11 14:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 14:40 Eli Cohen [this message]
2015-02-12  3:42 ` [PATCH net] net/mlx5_core: Fix configuration of log_uar_page_sz David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150211144038.GA18543@mtldesk30 \
    --to=eli@dev.mellanox.co.il \
    --cc=clsoto@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).