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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:31:32 +0000 (17:31 +0100)
commitf6ed795983fca6223324742426a89925f0de783a
tree83ded698ccba697e3a91a1c6d14ea6b02671c574
parent6dac61bfd6db96ee60ffa9d96d295bbc91bd2bba
net/mlx4_core: Add masking for a few queries on HCA caps

[ Upstream commit a40ded6043658444ee4dd6ee374119e4e98b33fc ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/fw.c