diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-04-17 20:13:27 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-22 04:47:57 +0300 |
commit | 91255347bba9637dc2717897127a6259cd4fbeac (patch) | |
tree | 3de0f525022b22faa9851c83d7279970fb3b72c5 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 6bf70d999aa90bc06656917baf042aead9cd4cda (diff) | |
download | linux-91255347bba9637dc2717897127a6259cd4fbeac.tar.xz |
net: stmmac: socfpga: call set_phy_mode() before registration
Initialisation/setup after registration is a bug. This is the second
of two patches fixing this in socfpga.
The set_phy_mode() functions do various hardware setup that would
interfere with a netdev that has been published, and thus available to
be opened by the kernel/userspace.
However, set_phy_mode() relies upon the netdev having been initialised
to get at the plat_stmmacenet_data structure, which is probably why it
was placed after stmmac_drv_probe(). We can remove that need by storing
a pointer to struct plat_stmmacenet_data in struct socfpga_dwmac.
Move the call to set_phy_mode() before calling stmmac_dvr_probe().
This also simplifies the probe function as there is no need to
unregister the netdev if set_phy_mode() fails.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/E1u5Snn-001IJq-L0@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions