From patchwork Mon Jun 13 03:42:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Chiu X-Patchwork-Id: 12878981 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 90540C43334 for ; Mon, 13 Jun 2022 03:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EKJz2YqNTVlWum9RZALbv7FQVdQ6wL4s8P0vxHm6cUM=; b=0Q3MWjupOeViJC puUs56oUb2cDxOIbMjh7yF6HBhJo/R91g7sziA/fGDkh2elrylxUoX3f3Y8ZdmHvgrymE+KhmI5Mh 21Cbirt6xy3a94qKtkTEXM/HmGOfbZByby2N8ZSzJtcHqJM7nOMI3qHxbjZdr+1Q4xSu7OzjMws3r rJMhSTheNRgirgkUIZWsLg12r4DFPscFD0IYnu3sbF12sv4CcbXSgezntGjFjdlGVvWoYAdHAerah Nx1keeKZdKZ7sh4QMBw7gBB+Jm2z9YU0tm0wOfPlb2YbLPB9CYM0V1ZrWTseRCp5Z9Sj5EsslEPIF CetvmtZ89lOPG5lL/b6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0b1D-001B2T-7k; Mon, 13 Jun 2022 03:45:35 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0b1A-001B0k-61 for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 03:45:33 +0000 Received: by mail-pl1-x636.google.com with SMTP id u18so4058023plb.3 for ; Sun, 12 Jun 2022 20:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3Wxg3U+5D8fpO2CZORZAqLiCHbqt6Bc2EUkzLHiwqOU=; b=WRgWCUEo6HS50H8PFnlOGwZ0WJod7AwjObge4uNzPK6qiCui/bvDuh5tMWi8I0EUCO mCxIGBQyLKCCRKMTh2rdQ3AgVacpLyUIX0jiF5co1VsvryLNUBoxwdQ5ULe2ty/ndxvw dZo1VdO7AmiUt8/Hj/etBy0LBKvTCvU1IZ2yP+kl2FwNXkRZJVb7DP1gAlUXLrdE5QXP wok5cBOfUylAjd2a2NVmVePHcRbhaiJ1onLtmaef+986MpwN5sjajEu4cypEzwAbT3x4 EcNyuFzKizTMja1//caTivXwd/EoDQMuGMhgWmSkddfWvfx0WnkrS1rSAc9YCTiSHWTr wAZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3Wxg3U+5D8fpO2CZORZAqLiCHbqt6Bc2EUkzLHiwqOU=; b=H0P9CSoC8Va6TlC4XO3ZYGLxIK1CYNERaXmRRCVtjZUnRcnwiquMPIFxyanpzrRYIV VccfRMh69liHAg+PkL8n0OKkNEFtM1g0jj7lLN8Kyq7tLasm07DeXWYyrz1RRoKMz4yi 8aJKf13kn46aG1Xhh/MnuZxteen4fmYSU2rkicXCg72sCkSjrTMewiL5XVrznZNuS7Ge yLP4hJ5Hvvc7tQR9lP8OzyA395eoxuWuVBjwCWXoXJVmqbSqlWPnLOH0iGYOyjFBQGH6 8CSjoA5F/nYUAmgAf69zvb0e0eSo4RSuQKDCti4fcdFXHbXygWT1/kd76j01l5GFdMWP 7dFA== X-Gm-Message-State: AOAM530xLJniUz9DyQvdTYpgDG5jprWi8C+0oUX1hD2R894njmMtMd90 E1lEdn4o9SZLss5tN4hkp09amA== X-Google-Smtp-Source: ABdhPJw8j3/81+1Ure63L8OB0av8ZUyXnSdUe/z8WMnsAWi2r+FuWZFmjYtaancU0hGNdetxTzfWCw== X-Received: by 2002:a17:902:7282:b0:164:17f6:e36a with SMTP id d2-20020a170902728200b0016417f6e36amr55486230pll.139.1655091929929; Sun, 12 Jun 2022 20:45:29 -0700 (PDT) Received: from archlinux.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id u13-20020a170902714d00b0015e8d4eb1dfsm3810769plm.41.2022.06.12.20.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 20:45:29 -0700 (PDT) From: Andy Chiu To: radhey.shyam.pandey@xilinx.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, michal.simek@xilinx.com, netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Andy Chiu Subject: [PATCH net-next 0/2] net: axienet: fix DMA Tx error Date: Mon, 13 Jun 2022 11:42:00 +0800 Message-Id: <20220613034202.3777248-1-andy.chiu@sifive.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220612_204532_332623_52A78B4B X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We ran into multiple DMA TX errors while writing files over a network block device running on top of a DMA-connected AXI Ethernet device on 64-bit RISC-V machines. The errors indicated that the DMA had fetched a null descriptor and we found that the reason for this is that AXI DMA had unexpectedly processed a partially updated tail descriptor pointer. To fix it, we suggest that the driver should use one 64-bit write instead of two 32-bit writes to perform such update if possible. For those archectures where double-word load/stores are unavailable, e.g. 32-bit archectures, force a driver probe failure if the driver finds 64-bit capability on DMA. Andy Chiu (2): net: axienet: make the 64b addresable DMA depends on 64b archectures net: axienet: Use iowrite64 to write all 64b descriptor pointers drivers/net/ethernet/xilinx/xilinx_axienet.h | 51 +++++++++++++++++++ .../net/ethernet/xilinx/xilinx_axienet_main.c | 28 ++-------- 2 files changed, 55 insertions(+), 24 deletions(-)