From patchwork Thu Feb 4 14:03:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Song, Yoong Siang" X-Patchwork-Id: 12066343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9697C433E0 for ; Thu, 4 Feb 2021 06:09:06 +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 2012864F4E for ; Thu, 4 Feb 2021 06:09:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2012864F4E 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+linux-arm-kernel=archiver.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=UjorxQiRR+pjYkXMTgPee46MZMytPKN4m7exLhVSwM8=; b=gfUikBjppdIl0/oqEedAIuHMav zEQOJ2y4b5vl+9aFa496UzHrVfjsH4mAi8Wdjrddlj4VYjXvwYnR/7sWCzimABxQtszTAfwO9L/IV NGiOdZsW3J2U4JUWBXAXU4iH82uTiNjglYC6H+pUsMXqcG2IGlAWhKmYjxVMCSk9v1n0HULr3tc/k vBavTeHxqbsVBW/FUM6GCz9HTzNR4yTVX4K5BN1TIpfapU2p70cTo5765zyz2plhinyNEDDPQNMcX jkj1Eckl5RWx9HHl2x26UUS4f79jw5LunNY24l8UtTpyRIcsAfXdjig8+cPPBfptcBBQ5BHnFkUHp oMosTvXg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7Xns-0007rr-0N; Thu, 04 Feb 2021 06:07:44 +0000 Received: from mga14.intel.com ([192.55.52.115]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7Xnp-0007rQ-63 for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 06:07:42 +0000 IronPort-SDR: DxpVl8vN+RPOZ2PQLEbVCBQYfFSgMOUrOtrNbfrh70Q3JXAZpmRfO63Ic53tcWnlYeywHYLsF7 sqT8DaWJy5OQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="180405095" X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="180405095" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 22:07:37 -0800 IronPort-SDR: GqenepCZ1VqBBEQ87nyq8OetNlRo6vlCyxXo/qqg4n3Jm1A6yowbrtNYPvD95I4kNJ6Zw4xKcw 1T+3iZ+3Lyfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="583080137" Received: from ssid-ilbpg3.png.intel.com ([10.88.227.36]) by fmsmga005.fm.intel.com with ESMTP; 03 Feb 2021 22:07:34 -0800 From: Song Yoong Siang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Subject: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS Date: Thu, 4 Feb 2021 22:03:16 +0800 Message-Id: <1612447396-20351-1-git-send-email-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_010741_366245_40B8CF2E X-CRM114-Status: GOOD ( 11.44 ) 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: Voon Wei Feng , Wong Vee Khee , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Gomes Vinicius , Song Yoong Siang , 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mohammad Athari Bin Ismail When disable CBS, mode_to_use parameter is not updated even the operation mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore, when tc_setup_cbs() function is called to re-enable CBS, the operation mode of Tx Queue remains at DCB, which causing CBS fails to work. This patch updates the value of mode_to_use parameter to MTL_QUEUE_DCB after operation mode of Tx Queue is changed to DCB in stmmac_dma_qmode() callback function. Fixes: 1f705bc61aee ("net: stmmac: Add support for CBS QDISC") Suggested-by: Gomes, Vinicius Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: Song, Yoong Siang Reviewed-by: Jesse Brandeburg Acked-by: Vinicius Costa Gomes --- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 8ed3b2c..5698554 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -324,7 +324,12 @@ static int tc_setup_cbs(struct stmmac_priv *priv, priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB; } else if (!qopt->enable) { - return stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_DCB); + ret = stmmac_dma_qmode(priv, priv->ioaddr, queue, + MTL_QUEUE_DCB); + if (ret) + return ret; + + priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; } /* Port Transmit Rate and Speed Divider */