]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9996d80fc0355046b6b0731b6dc2f70a2bfc565c
treece229992961027a624f0233513e397060a7fd4b4
parent1bacdf8efceef5908df3140c881eeaae9b0006d2
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