Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp692928ybx; Wed, 6 Nov 2019 07:04:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyzbMyG9YCupjRd8eN0RnSxdEju2+GTocDq7Y/IAlyugRsltJo1eq1K3iOpoIvZ5geuBgki X-Received: by 2002:aa7:d64e:: with SMTP id v14mr2342828edr.88.1573052671101; Wed, 06 Nov 2019 07:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573052671; cv=none; d=google.com; s=arc-20160816; b=duc33FSIfgGeIcdA15d7eX7LSpG2qjfX4tZaizpXoYgLJeg07CsN6o1YuKzlSSB31P OD6InpATBiAGZt4UpKc+YuwyJMcwdJchUrYNlYikXFzWSmk+hIRYOoeCS/z/nRfltlGP NSnckmluuIRyEidLmcgTfY2YqhvLtrpy4AqYzoyQnc7b0OKAC+UxcJWij35zPcv/d8n7 7ljppQLBmCjHFcE1nPVXFwxWvXb9qC45XV8n/G+XgO6zKzUHVMqDVuTRone+xWIZ2Fcl PHEWGVd9zYod8zUpfqxv4xdIT1bWzHHUp0Jmmb0OStA9YeejkI6MBEYAZUmdckovs6FP eCnA== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=GJTLwhz0n28oVy8p6+uw6P7LtxFkDAgCutW8JTxbRgE=; b=VNEiUasEjGOaK04FgDfJztkORJ8Q9oVRf+YsbxAqnXIuAYUAR9hc50GoTJq/V8fGvW vECfc5WDzves7VEALclXq61RmYgcXSbkmaLUNAEHTXOnaVrEtIbe4CdshHkaLCECoTzS 9J9zyGBTvslIOBy/1oXdNdMeAZT4vUbklM/bXQx0CBjKjcG1EbB25/VNf9ojsgY+qBEo Bxr5zUTjbTW7YvvpQN0O3a4vIHmTuBymIPyz31dNxQq1Qp/o84fSBoB0gNzCUplui7Yv Q2gnXrxuGlRNwi+hq2JE3uN+D2nKWLLhlSsoAde9TFu2oD1VTPkaXGXeGQA9yZPrL4Z+ 5oRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=S4sbwIDz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si1802201edx.188.2019.11.06.07.04.04; Wed, 06 Nov 2019 07:04:31 -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; dkim=pass header.i=@synopsys.com header.s=mail header.b=S4sbwIDz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732043AbfKFPDP (ORCPT + 99 others); Wed, 6 Nov 2019 10:03:15 -0500 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:43118 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731947AbfKFPDN (ORCPT ); Wed, 6 Nov 2019 10:03:13 -0500 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 1E216C0F4F; Wed, 6 Nov 2019 15:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1573052592; bh=5oeMB9CE84lgWSWl1HAT/3PLsWVooIarHoFAomQbC8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=S4sbwIDzBosHiMJ0XXvhTpL+iQyTI8N9TxIGxc5g5rjrDLqKefAAkJiegC6xTeLyr MMVAVklxiqwdwUbdQ77vxQzefbSKzUcHtgoGD4aBpct/UClTdasVuohYU1KiieVaFB 0rRxBMFcXZBzSjWxFim2heDC0NMVLYwQJB8petxr6nD9z9lyklpJwlfJxNg94MoBXc InlkkIf0b/dboBVTNI9wkQl9u6xC0vNYlX/xc+fh7NtTCutI501j1Mwni8gk3bE5Me H3CeiG2wi8HloyptzFkGUvfTPHGzaqlkwdCOpn8WypW6GZ1F2rZMjgWI2Bi9E2L6YA nsWBjyiTv9QjA== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id D5BC0A0079; Wed, 6 Nov 2019 15:03:10 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 07/11] net: stmmac: xgmac: Disable Flow Control when 1 or more queues are in AV Date: Wed, 6 Nov 2019 16:03:01 +0100 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When in AVB mode we need to disable flow control to prevent MAC from pausing in TX side. Fixes: ec6ea8e3eee9 ("net: stmmac: Add CBS support in XGMAC2") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 2e814aa64a5c..f70ca5300b82 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -470,6 +470,7 @@ static void dwxgmac2_enable_tso(void __iomem *ioaddr, bool en, u32 chan) static void dwxgmac2_qmode(void __iomem *ioaddr, u32 channel, u8 qmode) { u32 value = readl(ioaddr + XGMAC_MTL_TXQ_OPMODE(channel)); + u32 flow = readl(ioaddr + XGMAC_RX_FLOW_CTRL); value &= ~XGMAC_TXQEN; if (qmode != MTL_QUEUE_AVB) { @@ -477,6 +478,7 @@ static void dwxgmac2_qmode(void __iomem *ioaddr, u32 channel, u8 qmode) writel(0, ioaddr + XGMAC_MTL_TCx_ETS_CONTROL(channel)); } else { value |= 0x1 << XGMAC_TXQEN_SHIFT; + writel(flow & (~XGMAC_RFE), ioaddr + XGMAC_RX_FLOW_CTRL); } writel(value, ioaddr + XGMAC_MTL_TXQ_OPMODE(channel)); -- 2.7.4