Skip to content

Commit 47325da

Browse files
IoanaCiorneikuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ef57e6c commit 47325da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4042,7 +4042,11 @@ static int dpaa2_eth_connect_mac(struct dpaa2_eth_priv *priv)
40424042

40434043
dpni_dev = to_fsl_mc_device(priv->net_dev->dev.parent);
40444044
dpmac_dev = fsl_mc_get_endpoint(dpni_dev);
4045-
if (IS_ERR_OR_NULL(dpmac_dev) || dpmac_dev->dev.type != &fsl_mc_bus_dpmac_type)
4045+
4046+
if (PTR_ERR(dpmac_dev) == -EPROBE_DEFER)
4047+
return PTR_ERR(dpmac_dev);
4048+
4049+
if (IS_ERR(dpmac_dev) || dpmac_dev->dev.type != &fsl_mc_bus_dpmac_type)
40464050
return 0;
40474051

40484052
mac = kzalloc(sizeof(struct dpaa2_mac), GFP_KERNEL);

0 commit comments

Comments
 (0)