Message ID | 20210521141220.4057221-1-olteanv@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f5120f5998803a973b1d432ed2aa7e592527aa46 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: ruxandra.radulescu@nxp.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
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 >
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
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
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;