Skip to content
Commit 14d2b7c1 authored by Lucas Stach's avatar Lucas Stach Committed by David S. Miller
Browse files

net: fec: fix initial runtime PM refcount

The clocks are initially active and thus the device is marked active.
This still keeps the PM refcount at 0, the pm_runtime_put_autosuspend()
call at the end of probe then leaves us with an invalid refcount of -1,
which in turn leads to the device staying in suspended state even though
netdev open had been called.

Fix this by initializing the refcount to be coherent with the initial
device status.

Fixes:
8fff755e

 (net: fec: Ensure clocks are enabled while using mdio bus)

Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Tested-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2475b225
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment