Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp980547ybx; Thu, 31 Oct 2019 04:02:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKDRcUl9TJMGOYd8vORyA2xkdoqcmVYDSs/bkj6VuM6wGUADHrcCn+1iWsYkfRi3ZWNB8Y X-Received: by 2002:a17:906:c9d9:: with SMTP id hk25mr3283207ejb.74.1572519753731; Thu, 31 Oct 2019 04:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572519753; cv=none; d=google.com; s=arc-20160816; b=MIQhwb7MiABCAU0nrXOj/lRX4y5yEB0a2x+bf5c3lZ6V2RL4QLCDV6Pmc/I402xcxu JKi+1vAF8Ieh/U1oQBS8RkbwOWi9U6KdnbfRvw8nSoJPvruRPTh8zRYmisOdZj32PDI1 ChKUpHUNaYD4nxc5hRrYt0rEY//K25wUYY2SgaiV8m3qoiVjYoo82hwOD7iUboB5tMNi yayBCqaXRy7Xf+kcbmBmP49Do085aex49d1kqpjozU/odAK8KPszsztvcezVlBfQW2y6 58wbrcEtMKx3SqnLWpgyqSsj7VE++8owPS7GAz0BeB1/Mdb5cwyu8ENn42nABGDOgXkB TSYA== 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=oatp5IrXI568Nr/m1df9EVC6zDbMOFR6dW+ALo2hknU=; b=lAuOKXvWg6i9UurWKq/3eEPvlbaBihYk7eTXpoE+BfemTrHGjZaRAq1oTxNPuPJQa+ uHeD8DSzTkcefFn9yKf6Mo88p2QvRhYrI9u9fowUJKprmE+9h6Vkx5I7Zi1PuDUAaCXp uXbcfsAeJNEsc+akFavUsdz39GlGBDm29IUg2HKMrhsHUZl5no6L1nncP2feTHLruXSi vjyc3rjOWCZsPNSYHyJIUJg1W8zPAk7iYo64eiVEtCqAarKNC91dHGx3om+nUb0sCABa HJjAhbpzUGWtYtvJzNz4JtAPe0QIr540ktpuZ5w6QDGUMYUZS0FY+rpQYeTQSwbxqlo6 /Hag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=ZVpASdIc; 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 v35si4007104edm.213.2019.10.31.04.02.10; Thu, 31 Oct 2019 04:02:33 -0700 (PDT) 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=ZVpASdIc; 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 S1727531AbfJaLBJ (ORCPT + 99 others); Thu, 31 Oct 2019 07:01:09 -0400 Received: from us03-smtprelay2.synopsys.com ([149.117.87.133]:59344 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbfJaLBD (ORCPT ); Thu, 31 Oct 2019 07:01:03 -0400 Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (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 A7428C08B3; Thu, 31 Oct 2019 11:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1572519662; bh=YDnL8bpwK/tRJL9FcP1ml8xixy+yOmNErBznAAvEsXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=ZVpASdIcb0OYgCvj4Jb0YMsy7mpfK6fWYwhIwgCijFhsDCNrVI0Y+lPejRbydOh0x Qjstn+OR1SuMJRa81MVppQH9zlp9LjfLqV/dizl3GK5giakYr5v+6TRUNUkg/Psqkh ygy31CYlNZvjoclqfvK0PI0I92C+rBt4fQCi43n54sGn/WjRbVXTzND3oXaaQCMl8j ta5jw+Iw4NtSOnxcphxUuCEngW6qiagsp4mGelzM0KpfvDeZpamMJHMnijYaolepp0 wurJ0DsGPT5rrtFr1I0bKIVMtORptdnOgmRchJwz+GWs71AmwiIHL3SPPMNR/tmu0j wvHZLtEHSYIlg== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 5E65AA007E; Thu, 31 Oct 2019 11:01:00 +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 v2 08/10] net: stmmac: xgmac: Disable Flow Control when 1 or more queues are in AV Date: Thu, 31 Oct 2019 12:00:46 +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 7bd1447f9f47..f148cb2061d8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -473,6 +473,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) { @@ -480,6 +481,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