From: stsp Date: Thu, 23 Sep 2021 16:27:58 +0000 (+0000) Subject: Reset the Tx timer when iwx(4) firmware sends a BA notification. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f91ea6abe4d8bf04b7b60c8c642a8e4cbc619143;p=openbsd Reset the Tx timer when iwx(4) firmware sends a BA notification. When multiple frames are sent in a batch on a Tx aggregation queue our current firmware version does not provide the IWX_TX_CMD notification. Older versions used to provide this (as observed on iwm(4) devices), but our current firmware only sends IWX_BA_NOTIF. This means we need to reset the Tx timer upon BA_NOTIF in order to avoid a bogus "device timeout" trigger from our watchdog handler. Do this as soon as the BA notification has been validated. --- diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 12b741ac9f4..f9c68a2865e 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.110 2021/09/23 15:34:00 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.111 2021/09/23 16:27:58 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -4678,6 +4678,7 @@ iwx_rx_compressed_ba(struct iwx_softc *sc, struct iwx_rx_packet *pkt, idx = le16toh(ba_tfd->tfd_index); if (idx >= IWX_TX_RING_COUNT) continue; + sc->sc_tx_timer = 0; iwx_txq_advance(sc, ring, idx); iwx_clear_oactive(sc, ring); }