]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: macb: runtime detect MACB_CAPS_USRIO_DISABLED
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 25 Mar 2026 16:28:16 +0000 (16:28 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 29 Mar 2026 21:34:29 +0000 (14:34 -0700)
commit47c86c463612edc3107eb7c0fd25b463f1756adf
treef9a22824ea422caf09f6eb1de7901ec401648aa7
parent41adda8764fd4d5e0f4e40cdcf47d60344dc4c4d
net: macb: runtime detect MACB_CAPS_USRIO_DISABLED

DCFG1 (design config 1 register) carries a bit indicating whether User
I/O feature has been enabled or not. The MACB/GEM driver has a cap flag
indicating that HW has the feature disabled (default is enabled). Add
the missing connection between DCFG1 bit and MACB_CAPS_USRIO_DISABLED.

Indirect impact: avoid useless writel() on USERIO register; this is not
an important fix because USERIO is anyway read-only when feature is
disabled.

If for some reason a compatible sets USRIO_DISABLED but DCFG1 indicates
it is enabled, we still keep the disabled capability flag. This ensures
we don't break "cdns,np4-macb" that sets the flag from compatible match
data.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260325-compactly-glue-f426a2e68904@spud
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c