]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net/mlx5_core: Fix caching ATOMIC endian mode capability
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 23 Feb 2016 08:25:21 +0000 (10:25 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Mar 2016 20:29:07 +0000 (16:29 -0400)
Add caching of maximum device capability of ATOMIC endian mode.

Fixes: f91e6d8941bf ('net/mlx5_core: Add setting ATOMIC endian mode')
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 0916bbc692690c81f13a2a30dfa0a87fd101a399..1d43855d9f32a50216c8734dbc84dcf5aa109157 100644 (file)
@@ -423,6 +423,10 @@ static int handle_hca_cap_atomic(struct mlx5_core_dev *dev)
                                         HCA_CAP_OPMOD_GET_CUR);
                if (err)
                        return err;
+               err = mlx5_core_get_caps(dev, MLX5_CAP_ATOMIC,
+                                        HCA_CAP_OPMOD_GET_MAX);
+               if (err)
+                       return err;
        } else {
                return 0;
        }