From patchwork Mon Jun 22 18:29:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 194620 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=-8.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C6A8AC433DF for ; Mon, 22 Jun 2020 18:29:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 689F720732 for ; Mon, 22 Jun 2020 18:29:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=earth.li header.i=@earth.li header.b="izC/D2Dn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730264AbgFVS3p (ORCPT ); Mon, 22 Jun 2020 14:29:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730139AbgFVS3p (ORCPT ); Mon, 22 Jun 2020 14:29:45 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD63C061573; Mon, 22 Jun 2020 11:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CHDPQRCF8RcUn1ZfKaD8qjSY2WQnALFRzpAXrVpnKI0=; b=izC/D2DnG2aP9tepJ2H+BFC2Ug JmxyKdCL6mkil1f9KdbZtEzf5zpYswLlpRJdw6bFUlydhcq9hcCKGr58lrKn99BiLzNLAxb4V8TGi rEvMoKFqE0s/Q0GTDTx7WpJkwBjtQjlh6R3qwswx2zaL73Ds6QhadbawwNTxdbZ9dpfSeOIi/oOT8 mBIQOfrjgxfsU44yloKOvNlwGRqYQtp+u4Zwrbpl8ZvjRxg/uC0oXKgcWsdEXdD/yUdeiiCg0YH96 WHR7QVCiY9J5wGPv2B06iVP4ArqXPlyUFtxocDOubenxs7phzDiTanRq7cN7Zz1XZ8kOFNEV6ZGCW 6CYixE6Q==; Received: from noodles by the.earth.li with local (Exim 4.92) (envelope-from ) id 1jnRCO-00020W-KS; Mon, 22 Jun 2020 19:29:40 +0100 Date: Mon, 22 Jun 2020 19:29:40 +0100 From: Jonathan McDowell To: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, Mathieu Olivari Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , David Miller , Jakub Kicinski , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] net: stmmac: Set FIFO sizes for ipq806x Message-ID: <20200622182940.GA6991@earth.li> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org (This is an RFC in the hope someone with better knowledge of the Qualcomm IPQ806x hardware can confirm 8k is the correct FIFO depth. I've plucked that value from the MikroTik kernel patch, and it works for me, and 0 definitely isn't the right value.) Commit eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values") started using the TX FIFO size to verify what counts as a valid MTU request for the stmmac driver. This is unset for the ipq806x variant. Looking at older patches for this it seems the RX + TX buffers can be up to 8k, so set appropriately. Signed-off-by: Jonathan McDowell --- drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c index 02102c781a8c..546b37ebd3b0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c @@ -351,6 +351,8 @@ static int ipq806x_gmac_probe(struct platform_device *pdev) plat_dat->has_gmac = true; plat_dat->bsp_priv = gmac; plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; + plat_dat->tx_fifo_size = 8192; + plat_dat->rx_fifo_size = 8192; err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); if (err)