]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: stmmac: socfpga: init dwmac->stmmac_rst before registration
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 17 Apr 2025 17:13:12 +0000 (18:13 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 22 Apr 2025 01:47:56 +0000 (18:47 -0700)
commit9276bfc2df92c6c45a963dea34d8c83656987ea7
tree16db8036e87796a09801be356a0d83f128185ee6
parent544456b3b481dbd1f161c30c72564f4640699935
net: stmmac: socfpga: init dwmac->stmmac_rst before registration

Initialisation/setup after registration is a bug. This is the first of
two patches fixing this in socfpga.

dwmac->stmmac_rst is initialised from the stmmac plat_dat's stmmac_rst
member, which is itself initialised by devm_stmmac_probe_config_dt().
Therefore, this can be initialised before we call stmmac_dvr_probe().
Move it there.

dwmac->stmmac_rst is used by the set_phy_mode() method.

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/E1u5SnY-001IJY-90@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c