lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YKg79wM9jBETgPLv@lunn.ch>
Date:   Sat, 22 May 2021 01:02:15 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Ioana Ciornei <ioana.ciornei@....com>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next] dpaa2-eth: don't print error from
 dpaa2_mac_connect if that's EPROBE_DEFER

On Fri, May 21, 2021 at 05:12:20PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> When booting a board with DPAA2 interfaces defined statically via DPL
> (as opposed to creating them dynamically using restool), the driver will
> print an unspecific error message.
> 
> This change adds the error code to the message, and avoids printing
> altogether if the error code is EPROBE_DEFER, because that is not a
> cause of alarm.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> index e0c3c58e2ac7..8433aa730c42 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> @@ -4164,10 +4164,11 @@ static int dpaa2_eth_connect_mac(struct dpaa2_eth_priv *priv)
>  
>  	if (dpaa2_eth_is_type_phy(priv)) {
>  		err = dpaa2_mac_connect(mac);
> -		if (err) {
> -			netdev_err(priv->net_dev, "Error connecting to the MAC endpoint\n");
> +		if (err && err != -EPROBE_DEFER)
> +			netdev_err(priv->net_dev, "Error connecting to the MAC endpoint: %pe",
> +				   ERR_PTR(err));

Hi Vladimir

it might be worth adding a netdev_err_probe(), making use of
dev_err_probe().

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ