Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: fsl-dpaa2/eth: Defer probing if no MC portal available

MC portals may not be available at the initial probing attempt
due to dependencies on other modules.

Check the return value of the MC portal allocation function and
defer probing in case it's not available yet. For all other error
cases the behaviour stays the same.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Suggested-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ioana Radulescu and committed by
Greg Kroah-Hartman
8c369610 d59578da

+4 -1
+4 -1
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
··· 2441 2441 err = fsl_mc_portal_allocate(dpni_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, 2442 2442 &priv->mc_io); 2443 2443 if (err) { 2444 - dev_err(dev, "MC portal allocation failed\n"); 2444 + if (err == -ENXIO) 2445 + err = -EPROBE_DEFER; 2446 + else 2447 + dev_err(dev, "MC portal allocation failed\n"); 2445 2448 goto err_portal_alloc; 2446 2449 } 2447 2450