diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2021-01-08 12:07:25 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-10 03:21:30 +0300 |
commit | 47325da28ef137fa04a0e5d6d244e9635184bf5e (patch) | |
tree | 3ffc69be95c5832a48ab0fc38dbc7635c313dfb0 /drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | |
parent | ef57e6c9f7d988c550111d73fe337211da3d5100 (diff) | |
download | linux-47325da28ef137fa04a0e5d6d244e9635184bf5e.tar.xz |
dpaa2-eth: retry the probe when the MAC is not yet discovered on the bus
The fsl_mc_get_endpoint() function now returns -EPROBE_DEFER when the
dpmac device was not yet discovered by the fsl-mc bus. When this
happens, pass the error code up so that we can retry the probe at a
later time.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index f3f53e36aa00..a8c98869e484 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4042,7 +4042,11 @@ static int dpaa2_eth_connect_mac(struct dpaa2_eth_priv *priv) dpni_dev = to_fsl_mc_device(priv->net_dev->dev.parent); dpmac_dev = fsl_mc_get_endpoint(dpni_dev); - if (IS_ERR_OR_NULL(dpmac_dev) || dpmac_dev->dev.type != &fsl_mc_bus_dpmac_type) + + if (PTR_ERR(dpmac_dev) == -EPROBE_DEFER) + return PTR_ERR(dpmac_dev); + + if (IS_ERR(dpmac_dev) || dpmac_dev->dev.type != &fsl_mc_bus_dpmac_type) return 0; mac = kzalloc(sizeof(struct dpaa2_mac), GFP_KERNEL); |