All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER
@ 2021-05-21 14:12 Vladimir Oltean
  2021-05-21 20:36 ` Ioana Ciornei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2021-05-21 14:12 UTC (permalink / raw)
  To: Jakub Kicinski, David S. Miller, netdev; +Cc: Ioana Ciornei, Vladimir Oltean

From: Vladimir Oltean <vladimir.oltean@nxp.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@nxp.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));
+		if (err)
 			goto err_close_mac;
-		}
 	}
 
 	return 0;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER
  2021-05-21 14:12 [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER Vladimir Oltean
@ 2021-05-21 20:36 ` Ioana Ciornei
  2021-05-21 22:00 ` patchwork-bot+netdevbpf
  2021-05-21 23:02 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: Ioana Ciornei @ 2021-05-21 20:36 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Jakub Kicinski, David S. Miller, netdev@vger.kernel.org,
	Vladimir Oltean

On Fri, May 21, 2021 at 05:12:20PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.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@nxp.com>

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.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));
> +		if (err)
>  			goto err_close_mac;
> -		}
>  	}
>  
>  	return 0;
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER
  2021-05-21 14:12 [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER Vladimir Oltean
  2021-05-21 20:36 ` Ioana Ciornei
@ 2021-05-21 22:00 ` patchwork-bot+netdevbpf
  2021-05-21 23:02 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-21 22:00 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: kuba, davem, netdev, ioana.ciornei, vladimir.oltean

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 21 May 2021 17:12:20 +0300 you wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.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.
> 
> [...]

Here is the summary with links:
  - [net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER
    https://git.kernel.org/netdev/net-next/c/f5120f599880

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER
  2021-05-21 14:12 [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER Vladimir Oltean
  2021-05-21 20:36 ` Ioana Ciornei
  2021-05-21 22:00 ` patchwork-bot+netdevbpf
@ 2021-05-21 23:02 ` Andrew Lunn
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2021-05-21 23:02 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Jakub Kicinski, David S. Miller, netdev, Ioana Ciornei,
	Vladimir Oltean

On Fri, May 21, 2021 at 05:12:20PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.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@nxp.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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-21 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-21 14:12 [PATCH net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER Vladimir Oltean
2021-05-21 20:36 ` Ioana Ciornei
2021-05-21 22:00 ` patchwork-bot+netdevbpf
2021-05-21 23:02 ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.