[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727210843.kgcwrd6bpg65lyvj@lion.mk-sys.cz>
Date: Mon, 27 Jul 2020 23:08:43 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jamie Gloudon <jamie.gloudon@....fr>,
Jacob Keller <jacob.e.keller@...el.com>, netdev@...r.kernel.org
Subject: Re: Broken link partner advertised reporting in ethtool
On Mon, Jul 27, 2020 at 11:01:41PM +0200, Andrew Lunn wrote:
> > - the exact command you ran (including arguments)
> > - expected output (or at least the relevant part)
> > - actual output (or at least the relevant part)
> > - output with dump of netlink messages, you can get it by enabling
> > debugging flags, e.g. "ethtool --debug 0x12 eth0"
>
> Hi Michal
>
> See if this helps.
>
> This is a Marvel Ethernet switch port using an Marvell PHY.
Thank you. I think I can see the problem. Can you try the patch below?
Michal
diff --git a/netlink/settings.c b/netlink/settings.c
index 35ba2f5dd6d5..60523ad6edf5 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -280,6 +280,7 @@ int dump_link_modes(struct nl_context *nlctx, const struct nlattr *bitset,
const struct nlattr *bit;
bool first = true;
int prev = -2;
+ bool nomask;
int ret;
ret = mnl_attr_parse_nested(bitset, attr_cb, &bitset_tb_info);
@@ -338,6 +339,7 @@ int dump_link_modes(struct nl_context *nlctx, const struct nlattr *bitset,
goto after;
}
+ nomask = bitset_tb[ETHTOOL_A_BITSET_NOMASK];
printf("\t%s", before);
mnl_attr_for_each_nested(bit, bits) {
const struct nlattr *tb[ETHTOOL_A_BITSET_BIT_MAX + 1] = {};
@@ -354,7 +356,7 @@ int dump_link_modes(struct nl_context *nlctx, const struct nlattr *bitset,
if (!tb[ETHTOOL_A_BITSET_BIT_INDEX] ||
!tb[ETHTOOL_A_BITSET_BIT_NAME])
goto err;
- if (!mask && !tb[ETHTOOL_A_BITSET_BIT_VALUE])
+ if (!mask && !nomask && !tb[ETHTOOL_A_BITSET_BIT_VALUE])
continue;
idx = mnl_attr_get_u32(tb[ETHTOOL_A_BITSET_BIT_INDEX]);
Powered by blists - more mailing lists