Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2586936pxk; Mon, 14 Sep 2020 18:29:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHURnh/Lm0vfVo6QfWQ6zCPUvR0P1kA16ULX2ihPax6K01zAc3kceGk0Hm+D78i7h7omg+ X-Received: by 2002:a17:906:1fd5:: with SMTP id e21mr238888ejt.349.1600133398573; Mon, 14 Sep 2020 18:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600133398; cv=none; d=google.com; s=arc-20160816; b=ZChXu4t3OnFF5p2iI03/6lZxat9hMhYuEXxf48mIRukzk5/ZSktXKMMkptj+srptU7 NJiAPB8ynkO/Do8iQm7CGsOxWr/79ABQkWWSQkz+ltiXvXCNac+eBnGqzCrQe2N2s+Qs uuEuae5VLO8AoLjdC1gn19oQNfP/GuMjo/OS7IN6mdTtgCETE7rCx9ARLw52mGBXyWyj pGms/Xy0Zl1DGPgYeLMhqQDDvtJSBqTmIipEhpwD/uoH3B6tDCsTgBs6x5t7b8r5bv0t isQAOSoLh+qByOd1rCT6+3zQjYQcoCyHUP6aHhdW6ZaK3aItXZ9Eri9ey0+rIwgVw3Tv 41Tg== 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:ironport-sdr:ironport-sdr; bh=rRB8spDOkIwJCSCYYJX7/YiDF13/YncdLCX8XX+RMwQ=; b=c7F/RGm2aZWG73V/J++3alw9pLfq6OhK7qiJS4/mN1LmTCaKbdHUENCmc9tabxi6+A wGbDUP094QuDMRTsba1Dk0IoQkuERhNsabbWxTf8YxkGIYfOQ/iWfosuhWLktHz1hX9M XcjhKMXcEZOWJ0uasbyuXtMD5N/d2xtnEYPzD0bGwXzIpze3Q/jiSEAQr7X0yU3o8FW6 GnLmJ8avEl3j+RFSmzkWuNQBJXjyTwkGmkUkYX9UQdwjWEAWaREEz2eHr0EeNyD2SWon qLZsu7WT1osmunlu8xQsOYVrcnulYoAWLX6IShoPhPDQc4mmR7UEhAKtIFsjWwV2RGnB nhqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id p11si8391194ejc.160.2020.09.14.18.29.36; Mon, 14 Sep 2020 18:29:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726119AbgIOB1F (ORCPT + 99 others); Mon, 14 Sep 2020 21:27:05 -0400 Received: from mga17.intel.com ([192.55.52.151]:19913 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbgIOB1E (ORCPT ); Mon, 14 Sep 2020 21:27:04 -0400 IronPort-SDR: EWjanF5wLKklF24WYHB/xiPndjDfV3Z9r8gIqZd7O1UteisGP96w+IzE5nSUa+9+y7fCmWUD+0 LkN9gmwH7axQ== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="139195474" X-IronPort-AV: E=Sophos;i="5.76,427,1592895600"; d="scan'208";a="139195474" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 18:27:03 -0700 IronPort-SDR: tZVelu4X/niBIzR5mobsMcwKMUVbm7vWUpqZa86Y1XfGcpPU/xI+T1FnV+fdQchIMN39qtLbNF 3By/B/C53Z1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,427,1592895600"; d="scan'208";a="345632631" Received: from glass.png.intel.com ([172.30.181.92]) by orsmga007.jf.intel.com with ESMTP; 14 Sep 2020 18:26:59 -0700 From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Maxime Coquelin , Jakub Kicinski Cc: Joao Pinto , Arnd Bergmann , Rusell King , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong , Voon Wei Feng , Wong Vee Khee , Vijaya Balan Sadhishkhanna , Seow Chen Yong Subject: [PATCH net-next 2/3] net: stmmac: Fix incorrect location to set real_num_rx|tx_queues Date: Tue, 15 Sep 2020 09:28:39 +0800 Message-Id: <20200915012840.31841-3-vee.khee.wong@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20200915012840.31841-1-vee.khee.wong@intel.com> References: <20200915012840.31841-1-vee.khee.wong@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 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 | -- 2.17.0