]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx4_core: Add masking for a few queries on HCA caps
authorAya Levin <ayal@mellanox.com>
Tue, 22 Jan 2019 13:19:44 +0000 (15:19 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 May 2019 20:41:28 +0000 (21:41 +0100)
commit5cd34b292e1391b1745ad43b4f4a36ec66af0fcd
treeb7ce5452059695ac4e82bbad1f727ec84f0f6ed8
parent49e6f5166303618e09e4e4da47537a53fb14e6a6
net/mlx4_core: Add masking for a few queries on HCA caps

commit a40ded6043658444ee4dd6ee374119e4e98b33fc upstream.

Driver reads the query HCA capabilities without the corresponding masks.
Without the correct masks, the base addresses of the queues are
unaligned.  In addition some reserved bits were wrongly read.  Using the
correct masks, ensures alignment of the base addresses and allows future
firmware versions safe use of the reserved bits.

Fixes: ab9c17a009ee ("mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet")
Fixes: 0ff1fb654bec ("{NET, IB}/mlx4: Add device managed flow steering firmware API")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16:
 - There are no num_sys_eqs or dmfs_high_steer_mode parameters
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/mellanox/mlx4/fw.c