Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe

Christophe ROULLIER <[email protected]> Wed, 5 Aug 2026 11:08:58 +0200
Newsgroups gmane.linux.kernel,gmane.linux.network,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
Hi Maxime,

The pb comes from an error during ethernet probe (deferred because 
IOExpander used for Reset Ethernet of STM32MP13-DK is not ready), The pb 
is the Ethernet probe initialize pm-runtime but when error occur and 
exit from probe there is no deinit of pm-runtime so when the reprobe is 
called (after init of IOExpander) pm-runtime is already enable and the 
balance between "put" and "get" is not symetric, so Ethernet genpd is 
always active.

Ok I will remove this commit from my series and repush this commit on 
net-next.

Regards,

Christophe.


Le 04/08/2026 à 16:16, Maxime Chevallier a écrit :
> Hi Christophe,
>
> On 8/4/26 15:20, Christophe Roullier wrote:
>> In case of error during stmmac_mdio_register, pm_runtime is not
>> cleaning before exit probe.
>>
>> Signed-off-by: Christophe Roullier <[email protected]>
>> Reviewed-by: Russell King (Oracle) <[email protected]>
> Can you send this path to the proper networking tree ? Is it a bug you've
> encountered in the wild (like, eprobedefer or something ?) or just
> something you've noticed ?
>
> If this is something you encountered, let's send it to -net (and it would
> need a Fixes tag), otherwise just target that to net-next
>
> Thanks :)
>
> Maxime
>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index 0de4bc949913..852de0f51c09 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -8062,6 +8062,8 @@ static int __stmmac_dvr_probe(struct device *device,
>>   error_pcs_setup:
>>   	stmmac_mdio_unregister(ndev);
>>   error_mdio_register:
>> +	pm_runtime_put_sync(device);
>> +	pm_runtime_disable(device);
>>   	stmmac_napi_del(ndev);
>>   error_hw_init:
>>   	destroy_workqueue(priv->wq);