* [PATCH 1/2] net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable
@ 2016-04-20 8:56 Neil Armstrong
2016-04-21 18:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Neil Armstrong @ 2016-04-20 8:56 UTC (permalink / raw)
To: David S. Miller, Andrew Lunn, Tom Lendacky, Mugunthan V N,
netdev, linux-kernel
Cc: Neil Armstrong, Brian Hutchinson
In order to avoid an Unbalanced pm_runtime_enable in the DaVinci
emac driver when the device is removed and re-probed, and a
pm_runtime_disable() call in davinci_emac_remove().
Actually, using unbind/bind on a TI DM8168 SoC gives :
$ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind
net eth1: DaVinci EMAC: davinci_emac_remove()
$ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind
davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Fixes: 3ba97381343b ("net: ethernet: davinci_emac: add pm_runtime support")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/net/ethernet/ti/davinci_emac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 5d9abed..e9fe3fb 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -2101,6 +2101,7 @@ static int davinci_emac_remove(struct platform_device *pdev)
cpdma_ctlr_destroy(priv->dma);
unregister_netdev(ndev);
+ pm_runtime_disable(&pdev->dev);
free_netdev(ndev);
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable
2016-04-20 8:56 [PATCH 1/2] net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable Neil Armstrong
@ 2016-04-21 18:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-04-21 18:58 UTC (permalink / raw)
To: narmstrong
Cc: andrew, thomas.lendacky, mugunthanvnm, netdev, linux-kernel, b.hutchman
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Wed, 20 Apr 2016 10:56:13 +0200
> In order to avoid an Unbalanced pm_runtime_enable in the DaVinci
> emac driver when the device is removed and re-probed, and a
> pm_runtime_disable() call in davinci_emac_remove().
>
> Actually, using unbind/bind on a TI DM8168 SoC gives :
> $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind
> net eth1: DaVinci EMAC: davinci_emac_remove()
> $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind
> davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable
>
> Cc: Brian Hutchinson <b.hutchman@gmail.com>
> Fixes: 3ba97381343b ("net: ethernet: davinci_emac: add pm_runtime support")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-21 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 8:56 [PATCH 1/2] net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable Neil Armstrong
2016-04-21 18:58 ` David Miller
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.