summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-01-09 09:08:18 -0600
committerTom Rini <[email protected]>2026-01-09 10:19:57 -0600
commit1bcb2fe324180d0a8cfbdb0511737eba1d5b8550 (patch)
tree8b7449bae3c6c2202bab853f75813e9c43932bf1 /drivers/net
parentcf51247c632fe6f1f6c29a6f7754b99915182142 (diff)
parent217cf656e249f698d390a7d8eaf255eb1a6c0230 (diff)
Merge patch series "Enable / require DEVRES for devm_.alloc usage outside xPL"
Tom Rini <[email protected]> says: As seen by a number of patches fixing memory leaks, U-Boot has a problem with developer expectations around devm_kmalloc and friends. Namely, whereas in Linux these memory allocations will be freed automatically in most cases, in U-Boot this is only true if DEVRES is enabled. Now, intentionally, in xPL phases, we do not (and do not offer as an option) enabling DEVRES. However in full U-Boot this is left either to the user, or some drivers have select'd DEVRES on their own. This inconsistency is a problem. This series goes and deals with two small issues that were shown by having all drivers that use devm_.alloc to allocate memory also select DEVRES and then we make DEVRES no longer be a prompted option and instead select'd as needed. We do not make this unconditional as it would result in growing the resulting binary on the many platforms which have no users of the devm_.alloc family of functions. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig3
-rw-r--r--drivers/net/phy/Kconfig2
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index f382a7752d5..13e631c55dc 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -125,6 +125,7 @@ config AIROHA_ETH
bool "Airoha Ethernet QDMA Driver"
depends on ARCH_AIROHA
select PHYLIB
+ select DEVRES
select DM_RESET
select MDIO_MT7531
help
@@ -359,6 +360,7 @@ config ETH_SANDBOX_RAW
config ETH_DESIGNWARE
bool "Synopsys Designware Ethernet MAC"
+ select DEVRES
select PHYLIB
imply ETH_DESIGNWARE_SOCFPGA if ARCH_SOCFPGA
help
@@ -555,6 +557,7 @@ config MVNETA
config MVPP2
bool "Marvell Armada 375/7K/8K network interface support"
depends on ARMADA_375 || ARMADA_8K
+ select DEVRES
select PHYLIB
select MVMDIO
select DM_MDIO
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index d0aab0b8fe8..709f1c91eb2 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -182,6 +182,7 @@ config PHY_MARVELL
config PHY_MARVELL_10G
bool "Marvell Alaska 10Gbit PHYs"
+ select DEVRES
help
Support for the Marvell Alaska MV88X3310 and compatible PHYs.
@@ -245,6 +246,7 @@ config PHY_NATSEMI
config PHY_NXP_C45_TJA11XX
tristate "NXP C45 TJA11XX PHYs"
+ select DEVRES
help
Enable support for NXP C45 TJA11XX PHYs.
Currently supports only the TJA1103 PHY.