Module Name: src Committed By: knakahara Date: Wed Oct 20 02:05:15 UTC 2021
Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix Tx stall, reported and implemented original patch by chs@n.o, thanks. Check if_snd queue because if.c::if_transmit() doesn't call ifp->if_start() when IFQ_ENQUEUE failed. Reviewed and tested by chs@n.o and msaitoh@n.o. To generate a diff of this commit: cvs rdiff -u -r1.709 -r1.710 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.709 src/sys/dev/pci/if_wm.c:1.710 --- src/sys/dev/pci/if_wm.c:1.709 Mon Oct 18 11:36:11 2021 +++ src/sys/dev/pci/if_wm.c Wed Oct 20 02:05:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.709 2021/10/18 11:36:11 jmcneill Exp $ */ +/* $NetBSD: if_wm.c,v 1.710 2021/10/20 02:05:15 knakahara Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.709 2021/10/18 11:36:11 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.710 2021/10/20 02:05:15 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -9831,6 +9831,7 @@ static int wm_intr_legacy(void *arg) { struct wm_softc *sc = arg; + struct ifnet *ifp = &sc->sc_ethercom.ec_if; struct wm_queue *wmq = &sc->sc_queue[0]; struct wm_txqueue *txq = &wmq->wmq_txq; struct wm_rxqueue *rxq = &wmq->wmq_rxq; @@ -9890,6 +9891,8 @@ wm_intr_legacy(void *arg) } #endif more |= wm_txeof(txq, UINT_MAX); + if (!IF_IS_EMPTY(&ifp->if_snd)) + more = true; mutex_exit(txq->txq_lock); WM_CORE_LOCK(sc);