From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AA9EC3815B for ; Mon, 20 Apr 2020 12:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FA70206E9 for ; Mon, 20 Apr 2020 12:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587387427; bh=Hu8tgyiUBh7gWxY1nr8Tvf+Nyv6VuHNif6h6Bv101GI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JBKtaNcfup4sPNuzA3QwNeE/1dPq5CI1PDOVDRc73/wAoLW8Xhb+iRKBQDr71WRNp LDuCwPMB2rLBGrdbJJFrpVqOuGFL1uhgT+/dQheWm8Cua2/X9HUXcNm+m2iVQ6YQO4 jE3oQarbrS8EEIe80fl/qtY7hpNUVu2h9gzvy/hw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729739AbgDTM4s (ORCPT ); Mon, 20 Apr 2020 08:56:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:38894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728620AbgDTMoy (ORCPT ); Mon, 20 Apr 2020 08:44:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D04BE2072B; Mon, 20 Apr 2020 12:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587386694; bh=Hu8tgyiUBh7gWxY1nr8Tvf+Nyv6VuHNif6h6Bv101GI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oHSRENdMkJ5I/ZT4D0wv/rAAXjUrtTfbRWWNpBNLAvx9qCZFQ9ERMNmQKB9feJd1C SB8yNNe5LBl/msiWR162FOxaPeLT1h7KloqvdqOxlHinGy0S1OlgMX2W+nMWOCVrg8 u/+x6bmP+9wi0h5yxoMtF/MOBn+jo/ecVGkrZ6S0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen-Yu Tsai , Florian Fainelli , "David S. Miller" Subject: [PATCH 5.6 20/71] net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes Date: Mon, 20 Apr 2020 14:38:34 +0200 Message-Id: <20200420121512.402748252@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420121508.491252919@linuxfoundation.org> References: <20200420121508.491252919@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Florian Fainelli [ Upstream commit 806fd188ce2a4f8b587e83e73c478e6484fbfa55 ] After commit bfcb813203e619a8960a819bf533ad2a108d8105 ("net: dsa: configure the MTU for switch ports") my Lamobo R1 platform which uses an allwinner,sun7i-a20-gmac compatible Ethernet MAC started to fail by rejecting a MTU of 1536. The reason for that is that the DMA capabilities are not readable on this version of the IP, and there is also no 'tx-fifo-depth' property being provided in Device Tree. The property is documented as optional, and is not provided. Chen-Yu indicated that the FIFO sizes are 4KB for TX and 16KB for RX, so provide these values through platform data as an immediate fix until various Device Tree sources get updated accordingly. Fixes: eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values") Suggested-by: Chen-Yu Tsai Signed-off-by: Florian Fainelli Acked-by: Chen-Yu Tsai Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -150,6 +150,8 @@ static int sun7i_gmac_probe(struct platf plat_dat->init = sun7i_gmac_init; plat_dat->exit = sun7i_gmac_exit; plat_dat->fix_mac_speed = sun7i_fix_speed; + plat_dat->tx_fifo_size = 4096; + plat_dat->rx_fifo_size = 16384; ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv); if (ret)