* [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues
@ 2022-12-26 7:13 Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe() Yoshihiro Shimoda
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2022-12-26 7:13 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: netdev, linux-renesas-soc, Yoshihiro Shimoda
This patch series is based on v6.2-rc2.
Yoshihiro Shimoda (2):
net: ethernet: renesas: rswitch: Fix error path in
renesas_eth_sw_probe()
net: ethernet: renesas: rswitch: Fix getting mac address from device
tree
drivers/net/ethernet/renesas/rswitch.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe()
2022-12-26 7:13 [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues Yoshihiro Shimoda
@ 2022-12-26 7:13 ` Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 2/2] net: ethernet: renesas: rswitch: Fix getting mac address from device tree Yoshihiro Shimoda
2022-12-28 10:20 ` [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2022-12-26 7:13 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: netdev, linux-renesas-soc, Yoshihiro Shimoda
If rswitch_init() returns non-zero and this driver is re-probed,
the following error happens:
renesas_eth_sw e6880000.ethernet: Unbalanced pm_runtime_enable!
So, fix error path in renesas_eth_sw_probe().
Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/rswitch.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index e42ceaa0099f..473d86bdf97d 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1786,6 +1786,11 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
pm_runtime_get_sync(&pdev->dev);
ret = rswitch_init(priv);
+ if (ret < 0) {
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+ return ret;
+ }
device_set_wakeup_capable(&pdev->dev, 1);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] net: ethernet: renesas: rswitch: Fix getting mac address from device tree
2022-12-26 7:13 [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe() Yoshihiro Shimoda
@ 2022-12-26 7:13 ` Yoshihiro Shimoda
2022-12-28 10:20 ` [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2022-12-26 7:13 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni
Cc: netdev, linux-renesas-soc, Yoshihiro Shimoda
To get mac address from device tree which is from each ethernet-port,
fix the first argument of of_get_ethdev_address().
Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/net/ethernet/renesas/rswitch.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index 473d86bdf97d..6441892636db 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1578,6 +1578,7 @@ static int rswitch_device_alloc(struct rswitch_private *priv, int index)
{
struct platform_device *pdev = priv->pdev;
struct rswitch_device *rdev;
+ struct device_node *port;
struct net_device *ndev;
int err;
@@ -1606,7 +1607,9 @@ static int rswitch_device_alloc(struct rswitch_private *priv, int index)
netif_napi_add(ndev, &rdev->napi, rswitch_poll);
- err = of_get_ethdev_address(pdev->dev.of_node, ndev);
+ port = rswitch_get_port_node(rdev);
+ err = of_get_ethdev_address(port, ndev);
+ of_node_put(port);
if (err) {
if (is_valid_ether_addr(rdev->etha->mac_addr))
eth_hw_addr_set(ndev, rdev->etha->mac_addr);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues
2022-12-26 7:13 [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe() Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 2/2] net: ethernet: renesas: rswitch: Fix getting mac address from device tree Yoshihiro Shimoda
@ 2022-12-28 10:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-28 10:20 UTC (permalink / raw)
To: Yoshihiro Shimoda
Cc: davem, edumazet, kuba, pabeni, netdev, linux-renesas-soc
Hello:
This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 26 Dec 2022 16:13:26 +0900 you wrote:
> This patch series is based on v6.2-rc2.
>
> Yoshihiro Shimoda (2):
> net: ethernet: renesas: rswitch: Fix error path in
> renesas_eth_sw_probe()
> net: ethernet: renesas: rswitch: Fix getting mac address from device
> tree
>
> [...]
Here is the summary with links:
- [net,1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe()
https://git.kernel.org/netdev/net/c/8e6a8d7a3dd9
- [net,2/2] net: ethernet: renesas: rswitch: Fix getting mac address from device tree
https://git.kernel.org/netdev/net/c/bd2adfe3b3b8
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] 4+ messages in thread
end of thread, other threads:[~2022-12-28 10:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-26 7:13 [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 1/2] net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe() Yoshihiro Shimoda
2022-12-26 7:13 ` [PATCH net 2/2] net: ethernet: renesas: rswitch: Fix getting mac address from device tree Yoshihiro Shimoda
2022-12-28 10:20 ` [PATCH net 0/2] net: ethernet: renesas: rswitch: Fix minor issues patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.