Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3768156ybl; Mon, 13 Jan 2020 02:14:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzUxD0sz3o4Lrnsidd/XvdQXl17tFqsCYFO87Pa2smCK0UVcK/qkgxfHcaLEVrQJf/ERO1h X-Received: by 2002:a9d:4805:: with SMTP id c5mr12799350otf.292.1578910488623; Mon, 13 Jan 2020 02:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578910488; cv=none; d=google.com; s=arc-20160816; b=ZaspRisafxeOevy/PIufRp0ZyS3njwkrdK43lJlIZqXKqqIsY4AuTAaEBPkRn82wTM 5ZWQLvNzEMaasH1Sj6XPsHM6txeEJYbwJFyirokOOijRsICXzb9pk67Id0GOSVN+gqAT j1tR9KcdQwVtgorWPZEJDfuZGfrMZ5Vw98Pe1ptdvjZj+Y3aF0lNVEy/bdwclRieo700 pNg5BCxE1PJFsPyd6ZZaXT/22HpfUC8IiVpuE0g3KzHOoS76wjlVvEMj16MHQ1xIC6sd LzM648X00PufbGpcqNoF9MRGMYkv6HSRb3/zVX+TzjAo5U6PuZmm8bpLi+vpWsMcTwJU ZK3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=+pJpM02J0uBSfIMGwz51yscHdNwVgaYRG35bgIhnxJI=; b=zhx4CK5H8oLVCBx03zEAN0putrI1PGyHE+Fo8cpN0mzf39QMoOHqSHDM/21OWqo4eG CbyNYXv8O63eGLHb7VPtB7c76s1EcT3WDgNrfZxJw6KnaU01ZyEA38OE0hrJWMC+RqoL K8ECdutEGR3DxqNR6bLft1eECthsRFP4smEozIYuMxABZ3QfOiTDOP6+HMBPM3omM7bv sGcxgA9spTgHCSTe2mEQOWud6AUmxXNWXD7sxxt9gwQFznNiRUce3SBTfwEeFpzVaTUH rXBCj8hmG8YuRE+FYSrNO1/83YzMP52Vh3bSgli5PbR1puVfd7GdPeKS4ufd42awxkUz 5Hhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si6631405otr.102.2020.01.13.02.14.36; Mon, 13 Jan 2020 02:14:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbgAMKNe (ORCPT + 99 others); Mon, 13 Jan 2020 05:13:34 -0500 Received: from mga03.intel.com ([134.134.136.65]:10161 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbgAMKNb (ORCPT ); Mon, 13 Jan 2020 05:13:31 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2020 02:13:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,428,1571727600"; d="scan'208";a="397116774" Received: from bong5-hp-z440.png.intel.com ([10.221.118.136]) by orsmga005.jf.intel.com with ESMTP; 13 Jan 2020 02:13:28 -0800 From: Ong Boon Leong To: netdev@vger.kernel.org Cc: Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , "David S . Miller" , Maxime Coquelin , Ong Boon Leong , Tan Tee Min , Voon Weifeng , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 2/7] net: stmmac: Fix incorrect location to set real_num_rx|tx_queues Date: Tue, 14 Jan 2020 10:01:11 +0800 Message-Id: <1578967276-55956-3-git-send-email-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578967276-55956-1-git-send-email-boon.leong.ong@intel.com> References: <1578967276-55956-1-git-send-email-boon.leong.ong@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 a317f67..cd55d16 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2624,6 +2624,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) if (priv->dma_cap.vlins) stmmac_enable_vlan(priv, priv->hw, STMMAC_VLAN_INSERT); + /* 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); @@ -4624,10 +4628,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 | -- 2.7.4