[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170621140318.GD27585@lunn.ch>
Date: Wed, 21 Jun 2017 16:03:18 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Gal Pressman <galp@...lanox.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
"John W. Linville" <linville@...driver.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Vidya Sagar Ravipati <vidya@...ulusnetworks.com>,
Jiri Pirko <jiri@...lanox.com>,
David Decotigny <decot@...glers.com>, kernel-team@...com
Subject: Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to
ethtool
> +static int mlx5e_get_link_down_reason(struct net_device *netdev,
> + struct ethtool_link_down_reason *ldr)
> +{
> + struct mlx5e_priv *priv = netdev_priv(netdev);
> + u16 monitor_opcode;
> + int err;
> +
> + if (!netif_running(netdev)) {
> + ldr->reason = ETHTOOL_LINK_NETDEV_CARRIER_DOWN;
> + return 0;
> + }
This is generic, will work for any interface. The same is true for
ADMIN_DOWN. Either it is not required at all, since the information is
available via other means, or it should be in the core.
Andrew
Powered by blists - more mailing lists