linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Roi Dayan <roid@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH 4.19 8/8] net/mlx5e: Dont support phys switch id if not in switchdev mode
Date: Fri, 11 Sep 2020 14:54:55 +0200	[thread overview]
Message-ID: <20200911125422.103702175@linuxfoundation.org> (raw)
In-Reply-To: <20200911125421.695645838@linuxfoundation.org>

From: Roi Dayan <roid@mellanox.com>

Support for phys switch id ndo added for representors and if
we do not have representors there is no need to support it.
Since each port return different switch id supporting this
block support for creating bond over PFs and attaching to bridge
in legacy mode.

This bug doesn't exist upstream as the code got refactored and the
netdev api is totally different.

Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
Signed-off-by: Roi Dayan <roid@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/en_rep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -198,7 +198,7 @@ int mlx5e_attr_get(struct net_device *de
 	struct mlx5_eswitch_rep *rep = rpriv->rep;
 	struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
 
-	if (esw->mode == SRIOV_NONE)
+	if (esw->mode != SRIOV_OFFLOADS)
 		return -EOPNOTSUPP;
 
 	switch (attr->id) {



  parent reply	other threads:[~2020-09-11 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 12:54 [PATCH 4.19 0/8] 4.19.145-rc1 review Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 1/8] ALSA; firewire-tascam: exclude Tascam FE-8 from detection Greg Kroah-Hartman
2020-09-14  7:47   ` Pavel Machek
2020-09-14  7:58     ` Greg Kroah-Hartman
2020-09-16  8:16       ` Pavel Machek
2020-09-11 12:54 ` [PATCH 4.19 2/8] block: ensure bdi->io_pages is always initialized Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 3/8] netlabel: fix problems with mapping removal Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 4/8] net: usb: dm9601: Add USB ID of Keenetic Plus DSL Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 5/8] sctp: not disable bh in the whole sctp_get_port_local() Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 6/8] tipc: fix shutdown() of connectionless socket Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 7/8] net: disable netpoll on fresh napis Greg Kroah-Hartman
2020-09-11 12:54 ` Greg Kroah-Hartman [this message]
2020-09-11 22:23 ` [PATCH 4.19 0/8] 4.19.145-rc1 review Shuah Khan
2020-09-12  7:50 ` Naresh Kamboju

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=20200911125422.103702175@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roid@mellanox.com \
    --cc=saeedm@mellanox.com \
    --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).