diff mbox series

[v4] net: macb: Add default usrio config to default gem config

Message ID 20210303195549.1823841-1-atish.patra@wdc.com (mailing list archive)
State Accepted
Commit b12422362ce947098ac420ac3c975fc006af4c02
Delegated to: Netdev Maintainers
Headers show
Series [v4] net: macb: Add default usrio config to default gem config | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 57 this patch: 57
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes fail Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 33 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 57 this patch: 57
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Atish Patra March 3, 2021, 7:55 p.m. UTC
There is no usrio config defined for default gem config leading to
a kernel panic devices that don't define a data. This issue can be
reprdouced with microchip polar fire soc where compatible string
is defined as "cdns,macb".

Fixes: edac63861db7 ("add userio bits as platform configuration")

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
Changes from v3->v4:
1. Moved the macb_default_usrio out of OF_FDT to make buildbots happy.
Changes from v2->v3:
1. Fixed the typo in fixes tag.
Changes from v1->v2:
1. Fixed the fixes tag.
---
 drivers/net/ethernet/cadence/macb_main.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 4, 2021, 1 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed,  3 Mar 2021 11:55:49 -0800 you wrote:
> There is no usrio config defined for default gem config leading to
> a kernel panic devices that don't define a data. This issue can be
> reprdouced with microchip polar fire soc where compatible string
> is defined as "cdns,macb".
> 
> Fixes: edac63861db7 ("add userio bits as platform configuration")
> 
> [...]

Here is the summary with links:
  - [v4] net: macb: Add default usrio config to default gem config
    https://git.kernel.org/netdev/net/c/b12422362ce9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 472bf8f220bc..15362d016a87 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3954,6 +3954,13 @@  static int macb_init(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct macb_usrio_config macb_default_usrio = {
+	.mii = MACB_BIT(MII),
+	.rmii = MACB_BIT(RMII),
+	.rgmii = GEM_BIT(RGMII),
+	.refclk = MACB_BIT(CLKEN),
+};
+
 #if defined(CONFIG_OF)
 /* 1518 rounded up */
 #define AT91ETHER_MAX_RBUFF_SZ	0x600
@@ -4439,13 +4446,6 @@  static int fu540_c000_init(struct platform_device *pdev)
 	return macb_init(pdev);
 }
 
-static const struct macb_usrio_config macb_default_usrio = {
-	.mii = MACB_BIT(MII),
-	.rmii = MACB_BIT(RMII),
-	.rgmii = GEM_BIT(RGMII),
-	.refclk = MACB_BIT(CLKEN),
-};
-
 static const struct macb_usrio_config sama7g5_usrio = {
 	.mii = 0,
 	.rmii = 1,
@@ -4594,6 +4594,7 @@  static const struct macb_config default_gem_config = {
 	.dma_burst_length = 16,
 	.clk_init = macb_clk_init,
 	.init = macb_init,
+	.usrio = &macb_default_usrio,
 	.jumbo_max_len = 10240,
 };