All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net/mlx5: Enable 4K UAR only when page size is bigger than 4K" has been added to the 4.11-stable tree
@ 2017-06-29 16:58 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-29 16:58 UTC (permalink / raw)
  To: majd, gregkh, saeedm; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net/mlx5: Enable 4K UAR only when page size is bigger than 4K

to the 4.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5-enable-4k-uar-only-when-page-size-is-bigger-than-4k.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Jun 29 18:58:00 CEST 2017
From: Majd Dibbiny <majd@mellanox.com>
Date: Sun, 28 May 2017 14:47:56 +0300
Subject: net/mlx5: Enable 4K UAR only when page size is bigger than 4K

From: Majd Dibbiny <majd@mellanox.com>


[ Upstream commit 91828bd89940e8145f91751a015bc11bc486aad0 ]

When the page size isn't bigger than 4K, there is no added value of enabling 4K
UAR feature in the Firmware.

Modified the condition of enabling the 4K UAR accordingly.

Fixes: f502d834950a ("net/mlx5: Activate support for 4K UARs")
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -537,8 +537,10 @@ static int handle_hca_cap(struct mlx5_co
 	/* disable cmdif checksum */
 	MLX5_SET(cmd_hca_cap, set_hca_cap, cmdif_checksum, 0);
 
-	/* If the HCA supports 4K UARs use it */
-	if (MLX5_CAP_GEN_MAX(dev, uar_4k))
+	/* Enable 4K UAR only when HCA supports it and page size is bigger
+	 * than 4K.
+	 */
+	if (MLX5_CAP_GEN_MAX(dev, uar_4k) && PAGE_SIZE > 4096)
 		MLX5_SET(cmd_hca_cap, set_hca_cap, uar_4k, 1);
 
 	MLX5_SET(cmd_hca_cap, set_hca_cap, log_uar_page_sz, PAGE_SHIFT - 12);


Patches currently in stable-queue which might be from majd@mellanox.com are

queue-4.11/net-mlx5-enable-4k-uar-only-when-page-size-is-bigger-than-4k.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-29 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 16:58 Patch "net/mlx5: Enable 4K UAR only when page size is bigger than 4K" has been added to the 4.11-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.