Subject: Re: [net-next PATCH RFC 2/5] net: ethernet: stmicro: stmmac: first disable all queues in release

From: Jakub Kicinski <[email-masked]>
Date: Tue, 28 Jun 2022 20:54:35 -0700

On Tue, 28 Jun 2022 03:33:39 +0200 Christian Marangi wrote:
> +	stmmac_disable_all_queues(priv);
> +
> +	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
> +		hrtimer_cancel(&priv->tx_queue[chan].txtimer);

IIRC this hrtimer is to check for completions. Canceling it before
netif_tx_disable() looks odd, presumably until the queues are stopped
the timer can get scheduled again, no?

>  	netif_tx_disable(dev);
>  
>  	if (device_may_wakeup(priv->device))
> @@ -3764,11 +3769,6 @@ static int stmmac_release(struct net_device *dev)
>  	phylink_stop(priv->phylink);
>  	phylink_disconnect_phy(priv->phylink);
>  
> -	stmmac_disable_all_queues(priv);
> -
> -	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
> -		hrtimer_cancel(&priv->tx_queue[chan].txtimer);