stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: noaos@mellanox.com, dchang@suse.com, dledford@redhat.com,
	gregkh@linuxfoundation.org, leon@kernel.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "IB/mlx5: Enable MAD_IFC commands for IB ports only" has been added to the 4.7-stable tree
Date: Wed, 05 Oct 2016 17:39:50 +0200	[thread overview]
Message-ID: <1475681990232103@kroah.com> (raw)


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

    IB/mlx5: Enable MAD_IFC commands for IB ports only

to the 4.7-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:
     ib-mlx5-enable-mad_ifc-commands-for-ib-ports-only.patch
and it can be found in the queue-4.7 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 7fae6655a0c897875bd34501ec092232b526d3e4 Mon Sep 17 00:00:00 2001
From: Noa Osherovich <noaos@mellanox.com>
Date: Mon, 12 Sep 2016 19:16:23 +0300
Subject: IB/mlx5: Enable MAD_IFC commands for IB ports only

From: Noa Osherovich <noaos@mellanox.com>

commit 7fae6655a0c897875bd34501ec092232b526d3e4 upstream.

MAD_IFC command is supported only for physical functions (PF)
and when physical port is IB. The proposed fix enforces it.

Fixes: d603c809ef91 ("IB/mlx5: Fix decision on using MAD_IFC")
Reported-by: David Chang <dchang@suse.com>
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/mlx5/main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -287,7 +287,9 @@ __be16 mlx5_get_roce_udp_sport(struct ml
 
 static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev)
 {
-	return !MLX5_CAP_GEN(dev->mdev, ib_virt);
+	if (MLX5_CAP_GEN(dev->mdev, port_type) == MLX5_CAP_PORT_TYPE_IB)
+		return !MLX5_CAP_GEN(dev->mdev, ib_virt);
+	return 0;
 }
 
 enum {


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

queue-4.7/ib-mlx5-enable-mad_ifc-commands-for-ib-ports-only.patch

                 reply	other threads:[~2016-10-05 15:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475681990232103@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dchang@suse.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=noaos@mellanox.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).