net: stmmac: failure to probe without MAC interface specified
Subsystems (4)
PATCH 1/1 net: stmmac: failure to probe without MAC interface specified
Alexander Stein reports that commit a014c35556b9 ("net: stmmac: clarify difference between "interface" and "phy_interface"") caused breakage, because plat->mac_interface will never be negative. Fix this by using the "rc" temporary variable in stmmac_probe_config_dt().
---
I don't think the net tree is up to date with the net-next, so this patch needs applying to net-next preferably before the pull request to fix a regression.
Thanks.
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2 -3
@@ -419,9 +419,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)return ERR_PTR (phy_mode); plat->phy_interface = phy_mode; - plat->mac_interface =stmmac_of_get_mac_mode (np); -if (plat->mac_interface <0 ) - plat->mac_interface = plat->phy_interface; + rc =stmmac_of_get_mac_mode (np); + plat->mac_interface = rc <0 ? plat->phy_interface : rc;/* Some wrapper drivers still rely on phy_node. Let's save it while * they are not converted to phylink. */
Signature · 1 line
2.30.2
Am Dienstag, 29. August 2023, 15:29:50 CEST schrieb Russell King (Oracle):
Quoted 11 lines
Alexander Stein reports that commit
a014c35556b9("net: stmmac: clarify difference between "interface" and "phy_interface"") caused breakage, becauseplat->mac_interfacewill never be negative. Fix this by using the "rc" temporary variable instmmac_probe_config_dt().Reported-by Alexander Stein <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>---
I don't think the net tree is up to date with the net-next, so this patch needs applying to net-next preferably before the pull request to fix a regression.
On top of next-20230829:
Thanks
Quoted 22 lines
Thanks.
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.cindex35f4b1484029..0f28795e581c100644drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2
-3@@ -419,9 +419,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) return ERR_PTR(phy_mode); plat->phy_interface = phy_mode; - plat->mac_interface =stmmac_of_get_mac_mode (np); -if (plat->mac_interface <0 ) - plat->mac_interface = plat->phy_interface; + rc =stmmac_of_get_mac_mode (np); + plat->mac_interface = rc <0 ? plat->phy_interface : rc;/* Some wrapper drivers still rely on phy_node. Let's save it while * they are not converted to phylink. */
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 29 Aug 2023 14:29:50 +0100 you wrote:
Alexander Stein reports that commit
a014c35556b9("net: stmmac: clarify difference between "interface" and "phy_interface"") caused breakage, becauseplat->mac_interfacewill never be negative. Fix this by using the "rc" temporary variable instmmac_probe_config_dt().Reported-by Alexander Stein <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>[...]
Here is the summary with links:
- [net-next] net: stmmac: failure to probe without MAC interface specified
https://git.kernel.org/netdev/net/c/b5947239bfa6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html