* [PATCH v4] net: macb: Add default usrio config to default gem config
@ 2021-03-03 19:55 Atish Patra
2021-03-04 1:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Atish Patra @ 2021-03-03 19:55 UTC (permalink / raw)
To: netdev
Cc: Atish Patra, Nicolas Ferre, Claudiu Beznea, David S. Miller,
Jakub Kicinski, Andrew Lunn
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(-)
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,
};
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v4] net: macb: Add default usrio config to default gem config
2021-03-03 19:55 [PATCH v4] net: macb: Add default usrio config to default gem config Atish Patra
@ 2021-03-04 1:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-04 1:00 UTC (permalink / raw)
To: Atish Patra; +Cc: netdev, nicolas.ferre, claudiu.beznea, davem, kuba, andrew
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-04 1:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 19:55 [PATCH v4] net: macb: Add default usrio config to default gem config Atish Patra
2021-03-04 1:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).