OSDN Git Service

dpaa2-mac: return -EPROBE_DEFER from dpaa2_mac_open in case the fwnode is not set
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 6 Jan 2022 13:59:04 +0000 (15:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Jan 2022 03:49:10 +0000 (19:49 -0800)
commit4e30e98c4b4c8c3bd2ff048e4f4bc74c8948a9fb
treece229992961027a624f0233513e397060a7fd4b4
parent5b1e38c0792cc7a44997328de37d393f81b2501a
dpaa2-mac: return -EPROBE_DEFER from dpaa2_mac_open in case the fwnode is not set

We could get into a situation when the fwnode of the parent device is
not yet set because its probe didn't yet finish. When this happens, any
caller of the dpaa2_mac_open() will not have the fwnode available, thus
cause problems at the PHY connect time.

Avoid this by just returning -EPROBE_DEFER from the dpaa2_mac_open when
this happens.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c