net/mlx5_core: Fix configuration of log_uar_page_sz
authorEli Cohen <eli@dev.mellanox.co.il>
Wed, 11 Feb 2015 14:40:38 +0000 (16:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Feb 2015 03:42:23 +0000 (19:42 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index d6651937d8996188b249fe911b09e9cbbdc480a5..5394a848655876c2d0435ed6f8934363a060c303 100644 (file)
@@ -291,6 +291,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);
 }