From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35FB0C43334 for ; Wed, 29 Jun 2022 03:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbiF2Dyl (ORCPT ); Tue, 28 Jun 2022 23:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiF2Dyk (ORCPT ); Tue, 28 Jun 2022 23:54:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D97591FCD9; Tue, 28 Jun 2022 20:54:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A13E7B82160; Wed, 29 Jun 2022 03:54:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C218AC34114; Wed, 29 Jun 2022 03:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656474877; bh=uGe21oy82tSdMA/YvpYvQVzqQbNQiBgl0vADr1AFTdY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lNSlP1p+ukhqJtiPg2ozJ5MLFhq2KeadAUOnIaxqNjPNALtINmszC1a778vlk/+Jv QAi+R+5uceMsmtAbOx35LGxwwsPcG0N2aZ+xHf4OAHNKpYqjQWLHKDy+z8GsRcpjI2 XfxkCtqrEMAYKbPBm+8t/6UpYntRTKDFFD3oQXjdANESi/s6807MUxASlB3AZJguBc ulLXwIGHyiIFe+nY3V7+XDNQVP4q316rjalagSZzFQqTObTNvShUZ5jr84p16jxDJo 9ztfUwwO77UzYDDz5UlTNYCA8E+GCGUhlAfZE0N8k8A/72C6N87rVJhy9/HJOQ0JE0 u89rPBXslFfCg== Date: Tue, 28 Jun 2022 20:54:35 -0700 From: Jakub Kicinski To: Christian Marangi Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , Russell King , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH RFC 2/5] net: ethernet: stmicro: stmmac: first disable all queues in release Message-ID: <20220628205435.44b0c78c@kernel.org> In-Reply-To: <20220628013342.13581-3-ansuelsmth@gmail.com> References: <20220628013342.13581-1-ansuelsmth@gmail.com> <20220628013342.13581-3-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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);