[PATCH 2/5 next] net: vertexcom: mse102x: Silence TX timeout

Stefan Wahren posted 5 patches 1 year, 3 months ago
[PATCH 2/5 next] net: vertexcom: mse102x: Silence TX timeout
Posted by Stefan Wahren 1 year, 3 months ago
As long as the MSE102x is not operational, every packet transmission
will run into a TX timeout and flood the kernel log. So log only the
first TX timeout and a user is at least informed about this issue.
The amount of timeouts are still available via netstat.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 drivers/net/ethernet/vertexcom/mse102x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c
index 0711641fc3c9..336435fe8241 100644
--- a/drivers/net/ethernet/vertexcom/mse102x.c
+++ b/drivers/net/ethernet/vertexcom/mse102x.c
@@ -451,7 +451,7 @@ static void mse102x_tx_work(struct work_struct *work)

 	if (ret == -ETIMEDOUT) {
 		if (netif_msg_timer(mse))
-			netdev_err(mse->ndev, "tx work timeout\n");
+			netdev_err_once(mse->ndev, "tx work timeout\n");

 		mse->stats.tx_timeout++;
 	}
--
2.34.1
Re: [PATCH 2/5 next] net: vertexcom: mse102x: Silence TX timeout
Posted by Simon Horman 1 year, 3 months ago
On Tue, Aug 27, 2024 at 09:09:57PM +0200, Stefan Wahren wrote:
> As long as the MSE102x is not operational, every packet transmission
> will run into a TX timeout and flood the kernel log. So log only the
> first TX timeout and a user is at least informed about this issue.
> The amount of timeouts are still available via netstat.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>

Reviewed-by: Simon Horman <horms@kernel.org>