Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1977182ybc; Wed, 13 Nov 2019 07:13:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwgmkyrHf1vkVQQ/Uh+LmqG49UFscY7w6NTfZo01Mv1dEkSnwiPVw/Rt0Caa/h6kt/fOjKb X-Received: by 2002:a50:d80c:: with SMTP id o12mr4056908edj.251.1573658011653; Wed, 13 Nov 2019 07:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573658011; cv=none; d=google.com; s=arc-20160816; b=Rkhi4NAMptFxDzHV/y59Gg3vbOgO3qZWIqPrm7dYQ04JdJUT1poN7KtyuTzfrdde2E rE1xNmQDT757kLylSAH+jLC2JaCvQxbyxwNIVBzND9TTrrfNgZ+mA61tCiEXEB/q2fRS SK2kkLVGjOT6ts0nFo0nwBjC6z9NR2c6PI4DHGw40oJzL4uzuaSMUnuy41WTBEaoChAM 2HSyu/bP/Is0z4bjD4G9e+pXFAHXpuz80GjA8qlEhqyZk/1+wlYBR46waCiRtXiqx4Wu KJ4ZMkPixSUMxkCoZRFiT0pJhIhnc55FPUAywjnWXazzkK9JvtP2PPzoX4yaTXpNWGE8 g+Lw== 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=KbICYEgqW68EuNrhjVTm02znAKM+zYtX+DRhWCZHHfo=; b=Nf97kxq7hCESN1YjiVDIiaqzhQShnla7wJ++KmkwsrtlTBEh+06kt2IhDLDVO9djvG XC1nYNkpiXOJSAAP3G+/kqKkyNS4japctmRZu7dRH1vmO87WUxcwpnAKBYEF0KmIer95 jrX1dNjzPP7jFSbobIjWzg83sPKndsA1fRYZbQzxSca7Hq5UkXy07p9l9DkL93RsCW6n jyjFuG1a3o1ex0466Y1v18xXcWQ+pTULjauNqS+LnDzvbTUXhLLSrlyaq+qIU7NAZddW xMQKC2VnqpY7Sv5qRatrAz0bQZ9WBnESiw5IZc/B3mHlu0/mmSdE7ZM8qa6TDTFKZAnO RzpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=RKjwJjIb; 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 z2si1624383edd.140.2019.11.13.07.13.07; Wed, 13 Nov 2019 07:13: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=RKjwJjIb; 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 S1728017AbfKMPMX (ORCPT + 99 others); Wed, 13 Nov 2019 10:12:23 -0500 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:51236 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbfKMPMV (ORCPT ); Wed, 13 Nov 2019 10:12:21 -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 35925C0E96; Wed, 13 Nov 2019 15:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1573657941; bh=Ip3ZDkHX7NjVjcJ1Wnwx1pavIU7mIEYu8qbPr6qGCVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=RKjwJjIbQR+b7Qw8AJQTa1EuVAYkdBYBwdUPUj3HKxK5nhKYKRWpDhx4POpCBI6iX sVkFCKeRJssVtG6zlC3NP2ZtrCHf74fupWBYwmK6Cl4m4nS/BYkb0SpRvXvPVJsXSw utshHfdZHSs+9K5iyd8GS63XWDYic+ccPqomEDcUHGXJA1Z9zaoY/kX8YB8XBRzFU/ PxewJ9qPxkGL2xWv51Nm/89hQFqUpw5gvXggVdVfaet7xu0OWOjJq/uHdIk+QTvCUC W+6fZLi9+pecHIpgLmfZq4i27xMVKWE2Ety9HT/8Ru/WDY4df82Ap8VvaJdFegOaQM OM4kvyazqqGzg== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id B5DBDA008F; Wed, 13 Nov 2019 15:12:19 +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-next 5/7] net: stmmac: xgmac: Remove uneeded computation for RFA/RFD Date: Wed, 13 Nov 2019 16:12:06 +0100 Message-Id: <6c27de99de61a9dfa65ba163b5d870cac9f6a249.1573657592.git.Jose.Abreu@synopsys.com> 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 RFA and RFD should not be dependent on FIFO size. In fact, the more FIFO space we have, the later we can activate Flow Control. Let's use hard-coded values for RFA and RFD for all FIFO sizes with the exception of 4k, which is a special case. 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 | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index f148cb2061d8..22a7f0cc1b90 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -183,19 +183,9 @@ static void dwxgmac2_dma_rx_mode(void __iomem *ioaddr, int mode, rfa = 0x01; /* Full-1.5K */ break; - case 8192: - rfd = 0x06; /* Full-4K */ - rfa = 0x0a; /* Full-6K */ - break; - - case 16384: - rfd = 0x06; /* Full-4K */ - rfa = 0x12; /* Full-10K */ - break; - default: - rfd = 0x06; /* Full-4K */ - rfa = 0x1e; /* Full-16K */ + rfd = 0x07; /* Full-4.5K */ + rfa = 0x04; /* Full-3K */ break; } -- 2.7.4