]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: Add mdio-bcm-unimac soft dependency
authorJian-Hong Pan <jhp@endlessos.org>
Thu, 24 Jun 2021 03:22:41 +0000 (11:22 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Jun 2021 22:51:26 +0000 (15:51 -0700)
commitcaf4f86ab7bf350c21ae04d5f470c43216018d62
tree58ceb95434f44efdc50013d30a362bebca8cffaf
parentdc404c66e4f84fb842ddd5e8e359da10f6876f7f
net: bcmgenet: Add mdio-bcm-unimac soft dependency

The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late.
So, GENET cannot find the ethernet PHY on UniMAC MDIO bus. This leads
GENET fail to attach the PHY as following log:

bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
...
could not attach to PHY
bcmgenet fd580000.ethernet eth0: failed to connect to PHY
uart-pl011 fe201000.serial: no DMA platform data
libphy: bcmgenet MII bus: probed
...
unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus

It is not just coming too late, there is also no way for the module
loader to figure out the dependency between GENET and its MDIO bus
driver unless we provide this MODULE_SOFTDEP hint.

This patch adds the soft dependency to load mdio-bcm-unimac module
before genet module to fix this issue.

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=213485
Fixes: e6ac242ee955 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver")
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c