From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D8A229A0; Wed, 7 May 2025 18:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746643622; cv=none; b=FqLShksDlnH+e/9ddrZjnTu6+ojN/VIyb8mV4InF912JQzdoYGTLAqhnVHZXODZGIkcChRjIrbyqnwVUqImU5ys9RV1J3w/8OLItYC6JfhKckkeDGFLNBP6iZkrEK9O7JkxIUa+a5hXNQykpSB7D5Lgoflauxf4ctVNpV2FqoN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746643622; c=relaxed/simple; bh=DhJWh1ih1MV5ICyhqwV8oSWDnIZAsVLA7wGG3DsMF70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CkRPb79SkN+c7IGhkNzjI3ZQ15QlSRl1jF5uatbsZ4ski7oPHvoW+kSm8R4qrc/PR8k1czQ/lpSOqvbk4ndT0asfDtkrBbBsnyJylsvjNEUnOQ5WZgp+vJDp/lDo92zZ3N/ZUb08Qa5q1eTYqv53UEWApD8Tb9Lxly9x7Vy3CBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kxjcRGUG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kxjcRGUG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55DE6C4CEE2; Wed, 7 May 2025 18:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746643622; bh=DhJWh1ih1MV5ICyhqwV8oSWDnIZAsVLA7wGG3DsMF70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kxjcRGUGQtiwhSzojgtodBuYeledgIIMfBDD38+AoeQ8HzwymJ4ZicBCZZUVP/LWw wq6oabIeiMTXGMvHxO7WWGClqPhwVCYthqr0tSnH/3ah18tf1rvzOfqe3luOQH5LRG o6pGkIatyApdxBYZET6wtP/730DpgmxtXLefvvB0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mattias Barthel , Andrew Lunn , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 63/97] net: fec: ERR007885 Workaround for conventional TX Date: Wed, 7 May 2025 20:39:38 +0200 Message-ID: <20250507183809.531613372@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250507183806.987408728@linuxfoundation.org> References: <20250507183806.987408728@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mattias Barthel [ Upstream commit a179aad12badc43201cbf45d1e8ed2c1383c76b9 ] Activate TX hang workaround also in fec_enet_txq_submit_skb() when TSO is not enabled. Errata: ERR007885 Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues") There is a TDAR race condition for mutliQ when the software sets TDAR and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles). This will cause the udma_tx and udma_tx_arbiter state machines to hang. So, the Workaround is checking TDAR status four time, if TDAR cleared by hardware and then write TDAR, otherwise don't set TDAR. Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up") Signed-off-by: Mattias Barthel Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250429090826.3101258-1-mattiasbarthel@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fec_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 018ce4f4be6f3..4a513dba8f53e 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -692,7 +692,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq, txq->bd.cur = bdp; /* Trigger transmission start */ - writel(0, txq->bd.reg_desc_active); + if (!(fep->quirks & FEC_QUIRK_ERR007885) || + !readl(txq->bd.reg_desc_active) || + !readl(txq->bd.reg_desc_active) || + !readl(txq->bd.reg_desc_active) || + !readl(txq->bd.reg_desc_active)) + writel(0, txq->bd.reg_desc_active); return 0; } -- 2.39.5