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=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS 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 BAF9AC43381 for ; Mon, 1 Apr 2019 19:07:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8728420830 for ; Mon, 1 Apr 2019 19:07:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CDF36pib" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8728420830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nf3hb1O7xm7/Ahr+zv3IJwaFKQdGoMItasPzZBUBEMg=; b=CDF36pibE1SIu5 salFDttYgFXgXTo/FtJ11LV1aBUXCuxvv6hdqxtlZQwOkX4mCkxbMlStzcMpJa8oqz9/zBVYefnbQ aqCYrTIxN/57Z51l9vFljQlOK4llSKSUB3GTDYkp3rr3CSlcoAUbqHE0WlxhyXwR/JLGSKSHMKmhY SflbBWVDbufgT0NrqOpYwRPGW1vlKit0hyS/9YgyZWfhJj+4l1h/SxkWm9GNoQksS7paeVtvOTIhO ZFa+/GjAMiZ3x8Jhb8yOa8mlcIY4AfvoSsxC0OAcFPmEl9kjHkLOzQIHVnOCqODKUXGwsyDhmKZj7 jUf5d69oYetnbpt2jOLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hB2Gx-0008RI-1h; Mon, 01 Apr 2019 19:07:07 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hB2Gt-0008Qv-8p for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 19:07:04 +0000 Received: from ip5f5a6320.dynamic.kabel-deutschland.de ([95.90.99.32] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hB2Gj-0007GT-N5; Mon, 01 Apr 2019 21:06:53 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Robin Murphy Subject: Re: [PATCH 1/2] stmmac: introduce flag to dynamically disable TX offload for rockchip devices Date: Mon, 01 Apr 2019 21:06:53 +0200 Message-ID: <2312344.mOsv7YkeBG@diego> In-Reply-To: <9d65a22a-2288-dc53-0059-ec4a31424dd8@arm.com> References: <20190401181840.31255-1-papadakospan@gmail.com> <9d65a22a-2288-dc53-0059-ec4a31424dd8@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_120703_461279_4EDCEA73 X-CRM114-Status: GOOD ( 23.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jose Abreu , klaus.goger@theobroma-systems.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , philipp.tomsich@theobroma-systems.com, "Leonidas P. Papadakos" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Montag, 1. April 2019, 20:54:45 CEST schrieb Robin Murphy: > On 01/04/2019 19:18, Leonidas P. Papadakos wrote: > > From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= > > > > Some rockchip boards exhibit an issue where tx checksumming does not work with > > packets larger than 1498. > > Is it really a board-level problem? I'm no networking expert, but the > nature of the workaround suggests this is more likely to be some > inherent limitation of the IP block in the SoC, rather than something to > do with how the external pins get wired up. Does anyone have an RK3328 > or RK3399 board that provably *does* checksum large packets correctly? I don't have that many rk3399-boards with actual ethernet and even only the rock64 from rk3328-land, but at least my rk3399-firefly also seems affected by this. But so far the rk3399-puma board from Theobroma did not show that ethernet issue for me, so I've added two Theobroma people who may or may not tell if they've also seen that issue. > > > This is bad for network stability. > > > > The previous approach was using force_thresh_dma_mode in the board dts, which > > does more than we need. > > If indeed it is a SoC-level thing (or at least we want to treat it as > such), then couldn't we just hang it off the existing SoC-specific > compatibles in dwmac-rk.c and avoid the need for a new DT property at > all? After all, that's precisely why SoC-specific compatibles are a > thing in the first place. > > Robin. > > > Signed-off-by: Leonidas P. Papadakos > > --- > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ > > drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 ++ > > include/linux/stmmac.h | 1 + > > 3 files changed, 7 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > index 6a2e1031a..4552147e9 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > @@ -3660,6 +3660,10 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev, > > if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN)) > > features &= ~NETIF_F_CSUM_MASK; > > > > + /* Including very small MTUs of 1498 for Rockchip devices */ > > + if (priv->plat->bugged_tx_coe && (dev->mtu > ETH_DATA_LEN - 2)) > > + features &= ~NETIF_F_CSUM_MASK; > > + > > /* Disable tso if asked by ethtool */ > > if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) { > > if (features & NETIF_F_TSO) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > index 3031f2bf1..807cf5826 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > @@ -519,6 +519,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) > > pr_warn("force_sf_dma_mode is ignored if force_thresh_dma_mode is set."); > > } > > > > + plat->bugged_tx_coe = of_property_read_bool(np, "rockchip,bugged_tx_coe"); > > + > > of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed); > > > > plat->axi = stmmac_axi_setup(pdev); > > diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h > > index 4335bd771..60c411f43 100644 > > --- a/include/linux/stmmac.h > > +++ b/include/linux/stmmac.h > > @@ -162,6 +162,7 @@ struct plat_stmmacenet_data { > > int pmt; > > int force_sf_dma_mode; > > int force_thresh_dma_mode; > > + int bugged_tx_coe; > > int riwt_off; > > int max_speed; > > int maxmtu; > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel