]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Fix init_hca fields offset
authorAya Levin <ayal@nvidia.com>
Wed, 18 Nov 2020 08:19:22 +0000 (10:19 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Nov 2020 01:46:20 +0000 (17:46 -0800)
commit7139c4639db7f9903eb0fa85d6f814d9b8c268cd
treebfb80ce2ddafe292ca580c3cf5d1d3e49f316134
parentee0c8d163cd7b144d507aef5b8f5f34692ae773e
net/mlx4_core: Fix init_hca fields offset

Slave function read the following capabilities from the wrong offset:
1. log_mc_entry_sz
2. fs_log_entry_sz
3. log_mc_hash_sz

Fix that by adjusting these capabilities offset to match firmware
layout.

Due to the wrong offset read, the following issues might occur:
1+2. Negative value reported at max_mcast_qp_attach.
3. Driver to init FW with multicast hash size of zero.

Fixes: dc60078a25cf ("net/mlx4_core: Add masking for a few queries on HCA caps")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20201118081922.553-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/fw.h