From patchwork Thu Sep 10 13:03:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wong, Vee Khee" X-Patchwork-Id: 11767813 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC61C92C for ; Thu, 10 Sep 2020 13:03:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8945F206D4 for ; Thu, 10 Sep 2020 13:03:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m7n0y9nZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8945F206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vR6Aq1dUW/+v8nN/ojbZUSs+WYBX70hLeiET9yxjHtI=; b=m7n0y9nZGhkiUZKfjxtmF/A0e8 AFghinf1AK9u0GV/hN/FmrfMuBV9naQrx+oUn9YwjlMT3ZPXhdQObp+w0Eknq8vSJC+qgz8cDoYxU BOOE6REDKZAbIm63i/vPGWa/t1J20QTyEm7+vhkJsemRpniQohgjpty5KEYpQCjLSZN0j+g/LQbWG zzq9Kvfn/fD+YFKUUtI2M9L6OWhvC2PNUXHIXTJN/KzdmWLDngAw6usNka3w0gsnQNbX7dRxpW8s1 IUFDaVnSgJmrmBJlH+VpYAq2qKqjGIWaTgPjn+Re4398lfVz1i3J95XMOpxiv0PYQwxOyc2/52dei Gmn6df0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGMDU-000104-1l; Thu, 10 Sep 2020 13:02:20 +0000 Received: from mga11.intel.com ([192.55.52.93]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGMDH-0000px-HM for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 13:02:08 +0000 IronPort-SDR: n4SOuObUdPqDeMuEWUPF+rstCmwjGX3OFKmr5ysHWQ5uAJEj67atZzWwa6WTNJh+oD7+F8hVGj DReSorY4FaLA== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="155982367" X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="155982367" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 06:02:03 -0700 IronPort-SDR: S1rFM1mUOCY51KMgy45KFAjTbE4MlcEArsGaQgoirdTTKovsol6uIHM3WlHOHti9ElPTdIxOoR ocpbwya6fPmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="505828973" Received: from glass.png.intel.com ([172.30.181.92]) by fmsmga005.fm.intel.com with ESMTP; 10 Sep 2020 06:02:00 -0700 From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Subject: [PATCH net-next 2/3] net: stmmac: Fix incorrect location to set real_num_rx|tx_queues Date: Thu, 10 Sep 2020 21:03:44 +0800 Message-Id: <20200910130344.15013-1-vee.khee.wong@intel.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_090207_735407_55E55B60 X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.93 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 3.0 AC_FROM_MANY_DOTS Multiple periods in From user name X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joao Pinto , Voon Wei Feng , Arnd Bergmann , Wong Vee Khee , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ong Boon Leong , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Aashish Verma netif_set_real_num_tx_queues() & netif_set_real_num_rx_queues() should be used to inform network stack about the real Tx & Rx queue (active) number in both stmmac_open() and stmmac_resume(), therefore, we move the code from stmmac_dvr_probe() to stmmac_hw_setup(). Fixes: c02b7a914551 net: stmmac: use netif_set_real_num_{rx,tx}_queues Signed-off-by: Aashish Verma Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 9302d8012a10..fea3b77892ab 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2733,6 +2733,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) stmmac_enable_tbs(priv, priv->ioaddr, enable, chan); } + /* Configure real RX and TX queues */ + netif_set_real_num_rx_queues(dev, priv->plat->rx_queues_to_use); + netif_set_real_num_tx_queues(dev, priv->plat->tx_queues_to_use); + /* Start the ball rolling... */ stmmac_start_all_dma(priv); @@ -4883,10 +4887,6 @@ int stmmac_dvr_probe(struct device *device, stmmac_check_ether_addr(priv); - /* Configure real RX and TX queues */ - netif_set_real_num_rx_queues(ndev, priv->plat->rx_queues_to_use); - netif_set_real_num_tx_queues(ndev, priv->plat->tx_queues_to_use); - ndev->netdev_ops = &stmmac_netdev_ops; ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |