Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5068599pxb; Mon, 15 Feb 2021 08:41:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5vO2Co3jI1lfSHTYX16OsufhdzQ60x7DGYdVDIdCfYuK9+z++auO/D5Pqm9/a2+2afkXn X-Received: by 2002:a17:906:6848:: with SMTP id a8mr5640876ejs.362.1613407260511; Mon, 15 Feb 2021 08:41:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613407260; cv=none; d=google.com; s=arc-20160816; b=CKfz3xPeNHQt6tgDFKzdvzLZsYdmZZEKl67OGZ933TJa3tE5S6mGj/fl89U56wsX+M PaoMHQmdh1ciLUustSJKh/SqBLd7yw228esT7fOvOMP/2+96b2+/hoRHSJlW3qS0Zlgh irpNBXpQipzIdFxsU/41XoyT1sij/Ps6uVsEhIIeSBH6uOSeEkXmjxzI4TQnrcOG5dgD 7QW6guX/mN2ocqR4zD0s2qwz4Kg0B+9vhKDo2DLYFB1mySiWV062TH1/gsuCKTom4hmU AofMq8O+KTuhgfDks1LTusISwcc/fG+JNd4hCzte8C0oIic5OGApapZNbb4+/eq0AWKY RX5g== 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=aB1iRMFRo7CZPDKbazwv25QBQZNvJXmmbofllLakXrM=; b=Rbf3YCbZTv/Ffy4yF21ItZE750O4YpErI6Bdg14UvHyAT0jK1gTYyUNLx6hdTlJp8j Uw9SqFJ9X5O7XUYuDqHJeOFvCPG1i24kMncKh2gFGyb4R6lvNcr4qgFRqGSHBj8+uXN3 OHkRHX0djqX3R3o1mzhkUiOHuMB7n1jwxGETlZd8fCCaKMCesqDn+ZMS31wbZCLzstDm 5wbZI+kCUmjAwrrMHd2FQy3XT94xbb2oP799sdlQ5pUvdixoTBy50vWKuFslvghaQDEO NV3MlmA+KA+eplIa5YkfQc5lGbeoJOKGyLGPEH72dh36Rft2yTZSoEq6vdi9YeUNVaPM UDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=zz4bYIdX; 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 c59si12140186edd.508.2021.02.15.08.40.36; Mon, 15 Feb 2021 08:41:00 -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=zz4bYIdX; 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 S232355AbhBOQiN (ORCPT + 99 others); Mon, 15 Feb 2021 11:38:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:50208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbhBOPhy (ORCPT ); Mon, 15 Feb 2021 10:37:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D7B364EA9; Mon, 15 Feb 2021 15:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403207; bh=RppSirFCsVPvW+Wn8oeCGsI2fjKkHITVWvdtGTMFZ0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zz4bYIdXCfkWMhqem4qsL6vYsZGkMfZkTWx6S543hzGVWgEDhXGGKPfsKIEefiVBo czlX8Hmqd/EPlSvVOPtXcrFL0I9et+FMw/ovwY55Q9J4JMgpsXcfwazGAYAbrqayVO ihf1Ie0FdIzS5+KJqSzMt8+T3wdp9JdE4AmbisGA= 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.10 067/104] net: stmmac: set TxQ mode back to DCB after disabling CBS Date: Mon, 15 Feb 2021 16:27:20 +0100 Message-Id: <20210215152721.631015300@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@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 06553d028d746..6088071cb1923 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -330,7 +330,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