From nobody Tue Feb 10 10:54:07 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 B54BF1B0F19 for ; Fri, 23 Jan 2026 09:07:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769159272; cv=none; b=Gm4sBYWeVqbuUejfy8BSePkEA+NJlhMG+XDS0InicRR0grawo8AQojxfo8V9jJiBztxaJ6EFc4Yh7MfLaOCMVATtNzAhaWX6I768qBzEb56OyG6oBlIajy0Yu0eoMbX0aSVDyQeNLzQlwVdGxfRDkyHUSeV+YcGfBlsT0m7sHf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769159272; c=relaxed/simple; bh=9id+dPf4V4aFGOwRtmPbZkC/ulviMk3AceF/lZjHGPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lo6ymSBKFYW7wz66Vo0mFlpfBMKwbO8Gz7EsfHCs3i9HeZUehjhbZn7y9N2MX4oXHOKRhHAZmC5E4giluu8yGgEDq7BhJzVNmT3K33e6e7VLnJqPkWqRHwGG6DWbZ2kfIbcOhEZ9R4zwTQuTA4cX1cVwK0bP3vWlp1bS0BdKAoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vjD8q-00027H-59; Fri, 23 Jan 2026 10:07:44 +0100 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac] helo=dude04) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjD8p-00244y-0Y; Fri, 23 Jan 2026 10:07:42 +0100 Received: from ore by dude04 with local (Exim 4.98.2) (envelope-from ) id 1vjD8o-00000006ZWs-1oaF; Fri, 23 Jan 2026 10:07:42 +0100 From: Oleksij Rempel To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Thangaraj Samynathan , Rengarajan Sundararajan Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: [RFC PATCH 2/4] net: lan78xx: Implement FIFO stall recovery via lite reset Date: Fri, 23 Jan 2026 10:07:38 +0100 Message-ID: <20260123090741.1566469-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123090741.1566469-1-o.rempel@pengutronix.de> References: <20260123090741.1566469-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Implement the recovery logic for the devlink FIFO health reporter. The recovery callback triggers a full hardware Lite Reset using lan78xx_reset(). This is a fast, reliable way to restore traffic in unattended embedded deployments when a FIFO stall is detected. Signed-off-by: Oleksij Rempel --- drivers/net/usb/lan78xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 221be42e06f4..9dadca4101bc 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -4984,8 +4984,18 @@ static int lan78xx_internal_err_dump(struct devlink_= health_reporter *reporter, ARRAY_SIZE(lan78xx_err_regs)); } =20 +static int lan78xx_fifo_recover(struct devlink_health_reporter *reporter, + void *priv_ctx, struct netlink_ext_ack *extack) +{ + struct lan78xx_net *dev =3D devlink_health_reporter_priv(reporter); + + netdev_warn(dev->net, "Recovering from FIFO stall via Lite Reset\n"); + return lan78xx_reset(dev); +} + static const struct devlink_health_reporter_ops lan78xx_fifo_ops =3D { .name =3D "fifo", + .recover =3D lan78xx_fifo_recover, .dump =3D lan78xx_fifo_dump, }; =20 --=20 2.47.3