mlx5: Clear reserved area in set_hca_cap()

Firmware spec requires reserved fields to be cleared when calling
set_hca_cap.  Current code queries and copy to the set area, possibly
resulting in reserved bits not cleared. This patch copies only
writable fields to the set area.

Fix also typo - msx => max

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Eli Cohen
2013-10-23 09:53:20 +03:00
committed by Roland Dreier
parent bf0bf77f65
commit 87b8de492d
2 changed files with 39 additions and 5 deletions

View File

@@ -230,6 +230,11 @@ enum {
MLX5_MAX_PAGE_SHIFT = 31
};
enum {
MLX5_CAP_OFF_DCT = 41,
MLX5_CAP_OFF_CMDIF_CSUM = 46,
};
struct mlx5_inbox_hdr {
__be16 opcode;
u8 rsvd[4];
@@ -319,9 +324,9 @@ struct mlx5_hca_cap {
u8 rsvd25[42];
__be16 log_uar_page_sz;
u8 rsvd26[28];
u8 log_msx_atomic_size_qp;
u8 log_max_atomic_size_qp;
u8 rsvd27[2];
u8 log_msx_atomic_size_dc;
u8 log_max_atomic_size_dc;
u8 rsvd28[76];
};