From: Avihai Horon <avihaih@nvidia.com>
Subject: [PATCH] BACKPORT: drivers/net/ethernet/mellanox/mlx5/core/en_common.c

Change-Id: Ib9791c123c3e98216fd32cc7d1ea4e0b5acc7522
---
 drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
@@ -39,10 +39,15 @@
 void mlx5e_mkey_set_relaxed_ordering(struct mlx5_core_dev *mdev, void *mkc)
 {
 	bool ro_write = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
+#ifdef HAVE_PCIE_RELAXED_ORDERING_ENABLED
 	bool ro_read = MLX5_CAP_GEN(mdev, relaxed_ordering_read) ||
 		       (MLX5_CAP_GEN(mdev, relaxed_ordering_read_pci_enabled) &&
 			(mlx5_core_is_vf(mdev) ||
 			 pcie_relaxed_ordering_enabled(mdev->pdev)));
+#else
+	bool ro_read = MLX5_CAP_GEN(mdev, relaxed_ordering_read) ||
+		       MLX5_CAP_GEN(mdev, relaxed_ordering_read_pci_enabled);
+#endif
 
 	MLX5_SET(mkc, mkc, relaxed_ordering_read, ro_read);
 	MLX5_SET(mkc, mkc, relaxed_ordering_write, ro_write);
