From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E2C1C3358C6; Tue, 21 Jul 2026 18:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784657583; cv=none; b=gHgdvUFcg/PpaM9Ur862/tii8yzET0bDP7c2X0n+DZlixpC0dH1AXa3jDEJMItQs6v1lzztbmoqSiV4iG4hBNVF2fzCVG2oZsKRox/aBxUOZXvFNbIYqtveuE4o0eafv5Oy9F7KlLAJrLCN6Ub2U+V/QPnuljUeHpclWJNMefdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784657583; c=relaxed/simple; bh=4SFhvtPhkWrTm61Wr1jLSLW3DexvsZ1EWoUgBlagSWs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q9j+quawA71fKkQTZ8BWcchoFN7xSr2BPkC70sDcnLNvHYiR1Q7rg5v9Wke/REuf27g6lpRkWZMELMr4fqv110kU08z4AKdbqJSfQ68rJ4ZM69gSN2q5YyT+qi5eW4O56LuTsWeQuZDuBMVCW3bOitdRoGBymDgeXp+QY0s+l9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OGwwgBgX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OGwwgBgX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 543BB1F000E9; Tue, 21 Jul 2026 18:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784657581; bh=A6cAHBBGm6BgOzeutC0ZoSsmd/XmAXfg8oHPqSHeA6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OGwwgBgXQoRHO+M2ydg0HTmtOweQ7uOK1i1/a8WBEXDOhwz/LhvUhpm2ALa5AQqhq X8UbqaA3A68LTkclBqCaFLSTbPKTHzYu0bZY9+noUEs+Boj9xR5NkTyvdz7lKuw2+k wCeJxcgMpDV1rddRkA+PYo/sKEcVhXtFKJPFIKkQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lukasz Raczylo , Steffen Jaeckel , Andrea della Porta , Nicolai Buchwitz , =?UTF-8?q?Th=C3=A9o=20Lebrun?= , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.18 0818/1611] net: macb: add TX stall timeout callback to recover from lost TSTART write Date: Tue, 21 Jul 2026 17:15:34 +0200 Message-ID: <20260721152533.789994138@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152514.750365251@linuxfoundation.org> References: <20260721152514.750365251@linuxfoundation.org> User-Agent: quilt/0.69 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lukasz Raczylo [ Upstream commit e438ec3e9e95cd3f49a8120e5f63ae3f9606e6fa ] The MACB found in the Raspberry Pi RP1 suffers from sporadic stalls on the TX queue. While the exact root cause is not yet fully understood, it is likely related to a hardware issue where a TSTART write to the NCR register is missed, preventing the transmission from being kicked off. Implement a timeout callback to handle TX queue stalls, triggering the existing restart mechanism to recover. Link: https://lore.kernel.org/all/20260514215459.36109-1-lukasz@raczylo.com/ Fixes: dc110d1b23564 ("net: cadence: macb: Add support for Raspberry Pi RP1 ethernet controller") Signed-off-by: Lukasz Raczylo Co-developed-by: Steffen Jaeckel Signed-off-by: Steffen Jaeckel Co-developed-by: Andrea della Porta Signed-off-by: Andrea della Porta Reviewed-by: Nicolai Buchwitz Reviewed-by: Théo Lebrun Link: https://patch.msgid.link/468f480454a314303bac6a54780b153f689f2267.1781598350.git.andrea.porta@suse.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/cadence/macb_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 17d4a3e0394588..000796ebb6e360 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4416,6 +4416,13 @@ static int macb_setup_tc(struct net_device *dev, enum tc_setup_type type, } } +static void macb_tx_timeout(struct net_device *dev, unsigned int q) +{ + struct macb *bp = netdev_priv(dev); + + macb_tx_restart(&bp->queues[q]); +} + static const struct net_device_ops macb_netdev_ops = { .ndo_open = macb_open, .ndo_stop = macb_close, @@ -4434,6 +4441,7 @@ static const struct net_device_ops macb_netdev_ops = { .ndo_hwtstamp_set = macb_hwtstamp_set, .ndo_hwtstamp_get = macb_hwtstamp_get, .ndo_setup_tc = macb_setup_tc, + .ndo_tx_timeout = macb_tx_timeout, }; /* Configure peripheral capabilities according to device tree -- 2.53.0