netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net, jiri@resnulli.us
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next v2 1/5] devlink: fix condition for compat device info
Date: Sun, 10 Feb 2019 19:35:27 -0800	[thread overview]
Message-ID: <20190211033531.12928-2-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20190211033531.12928-1-jakub.kicinski@netronome.com>

We need the port to be both ethernet and have the rigth netdev,
not one or the other.

Fixes: ddb6e99e2db1 ("ethtool: add compat for devlink info")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
 net/core/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index e6a015b8ac9b..cf0f511bc56c 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -6385,7 +6385,7 @@ void devlink_compat_running_version(struct net_device *dev,
 	list_for_each_entry(devlink, &devlink_list, list) {
 		mutex_lock(&devlink->lock);
 		list_for_each_entry(devlink_port, &devlink->port_list, list) {
-			if (devlink_port->type == DEVLINK_PORT_TYPE_ETH ||
+			if (devlink_port->type == DEVLINK_PORT_TYPE_ETH &&
 			    devlink_port->type_dev == dev) {
 				__devlink_compat_running_version(devlink,
 								 buf, len);
-- 
2.19.2


  reply	other threads:[~2019-02-11  3:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11  3:35 [PATCH net-next v2 0/5] devlink: minor tweaks to reported device info Jakub Kicinski
2019-02-11  3:35 ` Jakub Kicinski [this message]
2019-02-11  3:35 ` [PATCH net-next v2 2/5] devlink: don't allocate attrs on the stack Jakub Kicinski
2019-02-11  3:35 ` [PATCH net-next v2 3/5] devlink: add a generic board.manufacture version name Jakub Kicinski
2019-02-11 12:59   ` Jiri Pirko
2019-02-11  3:35 ` [PATCH net-next v2 4/5] nfp: devlink: use the generic manufacture identifier instead of vendor Jakub Kicinski
2019-02-11 13:01   ` Jiri Pirko
2019-02-11  3:35 ` [PATCH net-next v2 5/5] nfp: devlink: include vendor/product info in serial number Jakub Kicinski
2019-02-11 13:01   ` Jiri Pirko
2019-02-12  4:40 ` [PATCH net-next v2 0/5] devlink: minor tweaks to reported device info David Miller

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=20190211033531.12928-2-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /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).