From patchwork Sat Oct 1 20:40:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9359461 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9AC46075E for ; Sat, 1 Oct 2016 20:41:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A40928CCF for ; Sat, 1 Oct 2016 20:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D28428CD3; Sat, 1 Oct 2016 20:41:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C4AB28CCF for ; Sat, 1 Oct 2016 20:41:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bqR6O-00005s-Eu; Sat, 01 Oct 2016 20:41:44 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bqR6M-0008SL-7L for linux-amlogic@lists.infradead.org; Sat, 01 Oct 2016 20:41:43 +0000 Received: by mail-wm0-x22f.google.com with SMTP id f193so43346714wmg.0 for ; Sat, 01 Oct 2016 13:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=L7ZPiSxanYvSGXOa3ygSfwTr/xdPO/936qC4PmEO9JM=; b=X4hyp0D5TEP6V7ENOsfW1KHW1ErwQma0JnuoNPjYHfdNN0uxHt77K31VNqlPaSSrel QGstu5d9To1lJfL8HUxjozESxl8eisSd3QgVk8CEPuLVRj1pAX1DXUByl+UseaLcT0Ql hSjb0DfhwlYvipX3tYj1hq9L87rSWvDxYj3+8idhaQ3YmS6BbfRh+IYRK+yeBUe403tP l0SfgLTXcS7S1bgoYQ8nl9XlUHTFxNLDfIJeBz9U/TR/1IrfEZ1uRzJDqTKXXzm89nlP f4Ho6Auaxy5eq7DbqUSK5h4AE2+bdWYd2L3AZkzGpK7yxeXLvLpFovxPsqFKccP5ezYA z/Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=L7ZPiSxanYvSGXOa3ygSfwTr/xdPO/936qC4PmEO9JM=; b=llZGm05QiDOtPUiAmcOZB1sVl2iXWzrLHWNjtCZvN3JHflmasJcClefBSnXpQbawDp lctgyxo/I/vuE594ZuuAg3jALu7McgeSMdbhXdgUaNYgWn2nwYQlU+kN3vhbBWqZzewf rREX+EfQm1N0eLaYI4VDmCn33SY7Mq9A7Vj8ashnE/f6nRVwZ4hhW8idT2zr1ePgP+Eg 07PQ7JYUnmyN5e9531TZPj2lb/COOLOv2dfeSOttsVFPrUbG1D5O8eWxv6PfSB6qYup3 NzvBJ9SfZsxvyXwZ3U+7gEPVaxXXGcH4XiBrC3FftUpX2yVX5bV5xtJRT9VI44fEfFBN jTdQ== X-Gm-Message-State: AA6/9Rl/d2MDHYoKMD42z9V1oym7WWZ8xOVntr9Nz1j9xucYP0w5+jZiRDWNpyK/0n4lVlwPd7v4AVuAinsj+g== X-Received: by 10.28.161.133 with SMTP id k127mr3475399wme.103.1475354480708; Sat, 01 Oct 2016 13:41:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.190.70 with HTTP; Sat, 1 Oct 2016 13:40:59 -0700 (PDT) In-Reply-To: References: From: Martin Blumenstingl Date: Sat, 1 Oct 2016 22:40:59 +0200 Message-ID: Subject: Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems To: Giuseppe CAVALLARO X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161001_134142_423939_06B66E54 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johnson Leung , netdev@vger.kernel.org, Alexandre Torgue , linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Oct 1, 2016 at 10:15 PM, Martin Blumenstingl wrote: > On Wed, Sep 14, 2016 at 5:30 PM, Giuseppe CAVALLARO > wrote: >> Also you could check the AXI tuning and PBL value. To be honest >> (thinking about your problem) I can actually suspect some related >> problem on bus setup. So I suggest you to play with these value >> (better if you ask for having values from HW validation on your side). >> Otherwise the stmmac uses a default that cannot be good for your >> platform. For example, sometime I have seen that PBL is better if >> reduced to 8 instead of 32 and w/o 4xPBL... > unfortunately the original kernel/firmware shipped with my device > seems to be also affected by that TX bug, so comparing with the > "stock" values does not work for me. I tried the following changes: - snps,pbl = <4>; in .dts - snps,pbl = <2>; in .dts - snps,pbl = <8>; in .dts and disabled DMA_BUS_MODE_MAXPBL (= 4xPBL) in stmmac None of these seem to have any impact on the TX problem diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi index 2e89ec4..7deab7a 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi @@ -698,6 +698,7 @@ <&clkc CLKID_MPLL2>; clock-names = "stmmaceth", "clkin0", "clkin1"; phy-mode = "rgmii"; + snps,pbl = <8>; status = "disabled"; }; }; diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c index 99074695..fffb407 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c @@ -97,7 +97,7 @@ static void dwmac1000_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb, * so only the bits: 13-8 are programmed with the PBL passed from the * platform. */ - value |= DMA_BUS_MODE_MAXPBL; + value &= ~DMA_BUS_MODE_MAXPBL; value &= ~DMA_BUS_MODE_PBL_MASK; value |= (pbl << DMA_BUS_MODE_PBL_SHIFT);