[PATCH] net: stmmac:fix system hang when setting up tag_8021q VLAN for DSA ports

Florian Fainelli f.fainelli at gmail.com
Thu Apr 13 07:08:53 PDT 2023



On 4/13/2023 6:38 AM, Yan Wang wrote:
> The system hang because of dsa_tag_8021q_port_setup()->
> 				stmmac_vlan_rx_add_vid().
> 
> I found in stmmac_drv_probe() that cailing pm_runtime_put()
> disabled the clock.
> 
> First, when the kernel is compiled with CONFIG_PM=y,The stmmac's
> resume/suspend is active.
> 
> Secondly,stmmac as DSA master,the dsa_tag_8021q_port_setup() function
> will callback stmmac_vlan_rx_add_vid when DSA dirver starts. However,
> The system is hanged for the stmmac_vlan_rx_add_vid() accesses its
> registers after stmmac's clock is closed.
> 
> I would suggest adding the pm_runtime_resume_and_get() to the
> stmmac_vlan_rx_add_vid().This guarantees that resuming clock output
> while in use.
> 
> Signed-off-by: Yan Wang <rk.code at outlook.com>

You have posted this patch several times now yet not on 
netdev at vger.kernel or towards the maintainers of the drivers, please 
consider using scripts/get_maintainer.pl.

While it looks like you are fixing a bug, it would be worthy of 
providing a suitable Fixes: tag since this is a genuine bugfix. You 
should also consider providing the target tree: 'net' for bug fixes and 
'net-next' for features, and also provide a version counter in the 
subject 'PATCH v4' or something like that.
-- 
Florian



More information about the linux-arm-kernel mailing list