Message ID | 20221214105118.2495313-1-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c72a7e42592b2e18d862cf120876070947000d7a |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2] ravb: Fix "failed to switch device to config mode" message during unbind | expand |
Hello: This patch was applied to netdev/net.git (master) by Paolo Abeni <pabeni@redhat.com>: On Wed, 14 Dec 2022 10:51:18 +0000 you wrote: > This patch fixes the error "ravb 11c20000.ethernet eth0: failed to switch > device to config mode" during unbind. > > We are doing register access after pm_runtime_put_sync(). > > We usually do cleanup in reverse order of init. Currently in > remove(), the "pm_runtime_put_sync" is not in reverse order. > > [...] Here is the summary with links: - [net,v2] ravb: Fix "failed to switch device to config mode" message during unbind https://git.kernel.org/netdev/net/c/c72a7e42592b You are awesome, thank you!
On 12/15/22 5:40 PM, patchwork-bot+netdevbpf@kernel.org wrote: > Hello: > > This patch was applied to netdev/net.git (master) > by Paolo Abeni <pabeni@redhat.com>: > > On Wed, 14 Dec 2022 10:51:18 +0000 you wrote: >> This patch fixes the error "ravb 11c20000.ethernet eth0: failed to switch >> device to config mode" during unbind. >> >> We are doing register access after pm_runtime_put_sync(). >> >> We usually do cleanup in reverse order of init. Currently in >> remove(), the "pm_runtime_put_sync" is not in reverse order. >> >> [...] > > Here is the summary with links: > - [net,v2] ravb: Fix "failed to switch device to config mode" message during unbind > https://git.kernel.org/netdev/net/c/c72a7e42592b > > You are awesome, thank you! Oops, was going to review the patch tonight, now that I'm back from the hospitals. MBR, Sergey
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 33f723a9f471..b4e0fc7f65bd 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2903,12 +2903,12 @@ static int ravb_remove(struct platform_device *pdev) priv->desc_bat_dma); /* Set reset mode */ ravb_write(ndev, CCC_OPC_RESET, CCC); - pm_runtime_put_sync(&pdev->dev); unregister_netdev(ndev); if (info->nc_queues) netif_napi_del(&priv->napi[RAVB_NC]); netif_napi_del(&priv->napi[RAVB_BE]); ravb_mdio_release(priv); + pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); reset_control_assert(priv->rstc); free_netdev(ndev);