Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix Tx stall, reported and implemented original ...
details: https://anonhg.NetBSD.org/src/rev/5441fdb1a0ba
branches: trunk
changeset: 989910:5441fdb1a0ba
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed Oct 20 02:05:15 2021 +0000
description:
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.
diffstat:
sys/dev/pci/if_wm.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r ca6a10f052d3 -r 5441fdb1a0ba sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed Oct 20 01:09:49 2021 +0000
+++ b/sys/dev/pci/if_wm.c Wed Oct 20 02:05:15 2021 +0000
@@ -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 @@
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 @@
}
#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);
Home |
Main Index |
Thread Index |
Old Index