Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5036231pxb; Mon, 15 Feb 2021 07:56:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy01Pm9MeK3f6yO3IQMz1qkWRyyySg6x6/JV2763GrXaR21N1f2PWeTBXD7XD5xv9tPuQ7M X-Received: by 2002:a17:906:63c2:: with SMTP id u2mr15995185ejk.346.1613404580989; Mon, 15 Feb 2021 07:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404580; cv=none; d=google.com; s=arc-20160816; b=O3S3QWgHzuJNAdnO8vFHN8cuaXRRGE4UzeEETiMpMKUMB2IGDI9tetFFEhRKnsBWmM 3rmfsDZJjYU2qJ2lUxAFf52qPrxA716VIDxDio4ZhGN/9c6A34MDYTMEV6RX9sDs8yMS eY/xw3WuCuKfnkKTnO90cz7uU+SaGWpzl/3s5AVVvVoAGUoblDQyf0N4xFwpcxRcK7+N 1+KDPR75fkV8n5t5FoP9CeveN1A1bp3Ocuk9/Q7b6M8tMiTZeriblVvwBpFfmsCbHeZ9 zTYHoWhmefzlD17qDvDqEmpafOw9ApGcMr1FYjQCA6RWxmMJR+ptQeBI4vWkbSRtfC6l FpFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NOMXfAd+tW6wGGZbUxwX0yer/JtaU/Pk9F3fShdTBHg=; b=tYdD5VaBRxMuhq8MxI2OMDqoqpSWmDZyw6utE2C7DjcfBL4lDk/KFB5qjT2buaDqPe hDLxNOLaRG7bObKTJSrFnLyRr7zdDZD6bkwbCuPTusMoRcCqZxaukKovtn9mkGg1SMTW o7kjt4DdWk/Ei5gEiXMuyX1odvjLSiiycOBfgs6TlhjqtPr3kBwswdNIdJTXXb2hsUBr JvBgOjSDekKWLCQAoKd3T8d5VGnAFzEK7xl1ArZeRHzEHlLfIKNm2v+tDpmrFEJD8KSF vV4sOppMovCd0Qp60TSEHVMr8J8NmNPCk8lIHoKgsuN+lyg5xMX8AOP144FAzIqpTuHw wKiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b="nr/6vCet"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si4928149eji.495.2021.02.15.07.55.57; Mon, 15 Feb 2021 07:56:20 -0800 (PST) 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; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b="nr/6vCet"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbhBOPwT (ORCPT + 99 others); Mon, 15 Feb 2021 10:52:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:46846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbhBOPbh (ORCPT ); Mon, 15 Feb 2021 10:31:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 38C6E64E8D; Mon, 15 Feb 2021 15:29:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613402961; bh=fo2yfu+WbSY0HsxWCdHXg9uoBMjqPu07TLIm50NAOi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nr/6vCetB62wSv9RT7ArqGAn0GMrzyUahzd+co7sYsY00XjfJMqDdQ6HfZFhbJIo6 wf/vvTuj9mzHaL3ZErcF9bnUhFKmL6m158S8gFbgTi15t/TUOouPMk1F8nNeteFeb2 yAqjTRejHrgGlJksICrm2+HqV+4irbRywih2nRGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinicius Costa Gomes , Mohammad Athari Bin Ismail , "Song, Yoong Siang" , Jesse Brandeburg , Jakub Kicinski , Sasha Levin , Song@vger.kernel.org Subject: [PATCH 5.4 35/60] net: stmmac: set TxQ mode back to DCB after disabling CBS Date: Mon, 15 Feb 2021 16:27:23 +0100 Message-Id: <20210215152716.479393398@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mohammad Athari Bin Ismail [ Upstream commit f317e2ea8c88737aa36228167b2292baef3f0430 ] 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: Vinicius Costa Gomes Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: Song, Yoong Siang Reviewed-by: Jesse Brandeburg Acked-by: Vinicius Costa Gomes Link: https://lore.kernel.org/r/1612447396-20351-1-git-send-email-yoong.siang.song@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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 1d135b02ea021..52b453b605979 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -332,7 +332,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 */ -- 2.27.0