From: stsp Date: Thu, 8 Feb 2024 14:33:40 +0000 (+0000) Subject: fix qwx_dp_shadow_start_timer() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b6a3e7084ade08cf045132054889912e73417916;p=openbsd fix qwx_dp_shadow_start_timer() We must count all Tx attempts in order to avoid the Tx shadow timeout handler resetting Tx ring pointers when it shouldn't. --- diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c index fe8b32a386f..d9f94e536cd 100644 --- a/sys/dev/ic/qwx.c +++ b/sys/dev/ic/qwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qwx.c,v 1.25 2024/02/08 14:31:53 stsp Exp $ */ +/* $OpenBSD: qwx.c,v 1.26 2024/02/08 14:33:40 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -9403,6 +9403,10 @@ qwx_dp_shadow_start_timer(struct qwx_softc *sc, struct hal_srng *srng, if (!sc->hw_params.supports_shadow_regs) return; + update_timer->tx_num++; + if (update_timer->started) + return; + update_timer->started = 1; update_timer->timer_tx_num = update_timer->tx_num;