diff options
-rw-r--r-- | sys/dev/ic/bcmgenet.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/gem.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/hme.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/re.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/xl.c | 7 |
5 files changed, 19 insertions, 12 deletions
diff --git a/sys/dev/ic/bcmgenet.c b/sys/dev/ic/bcmgenet.c index 60ca5145606..3da74eaf968 100644 --- a/sys/dev/ic/bcmgenet.c +++ b/sys/dev/ic/bcmgenet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcmgenet.c,v 1.1 2020/04/14 21:02:39 kettenis Exp $ */ +/* $OpenBSD: bcmgenet.c,v 1.2 2020/06/22 02:27:04 dlg Exp $ */ /* $NetBSD: bcmgenet.c,v 1.3 2020/02/27 17:30:07 jmcneill Exp $ */ /*- @@ -729,8 +729,10 @@ genet_rxintr(struct genet_softc *sc, int qid) sc->sc_rx.next = index; sc->sc_rx.pidx = pidx; + if (ifiq_input(&ifp->if_rcv, &ml)) + if_rxr_livelocked(&sc->sc_rx_ring); + genet_fill_rx_ring(sc, qid); - if_input(ifp, &ml); } } diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index ced354c5b15..fc1480d14fe 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.123 2018/02/07 22:35:14 bluhm Exp $ */ +/* $OpenBSD: gem.c,v 1.124 2020/06/22 02:27:04 dlg Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -1020,6 +1020,9 @@ gem_rint(struct gem_softc *sc) ml_enqueue(&ml, m); } + if (ifiq_input(&ifp->if_rcv, &ml)) + if_rxr_livelocked(&sc->sc_rx_ring); + /* Update the receive pointer. */ sc->sc_rx_cons = i; gem_fill_rx_ring(sc); @@ -1028,8 +1031,6 @@ gem_rint(struct gem_softc *sc) DPRINTF(sc, ("gem_rint: done sc->sc_rx_cons %d, complete %d\n", sc->sc_rx_cons, bus_space_read_4(t, h, GEM_RX_COMPLETION))); - if_input(ifp, &ml); - return (1); } diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index 9ab36cf07a3..fd536dadd0d 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.81 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: hme.c,v 1.82 2020/06/22 02:27:04 dlg Exp $ */ /* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */ /*- @@ -844,7 +844,8 @@ hme_rint(struct hme_softc *sc) ml_enqueue(&ml, m); } - if_input(ifp, &ml); + if (ifiq_input(&ifp->if_rcv, &ml)) + if_rxr_livelocked(&sc->sc_rx_ring); sc->sc_rx_cons = ri; hme_fill_rx_ring(sc); diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 05e37edecc7..ce00fbc20da 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.204 2019/11/19 06:34:10 kevlo Exp $ */ +/* $OpenBSD: re.c,v 1.205 2020/06/22 02:27:04 dlg Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1398,10 +1398,12 @@ re_rxeof(struct rl_softc *sc) ml_enqueue(&ml, m); } + if (ifiq_input(&ifp->if_rcv, &ml)) + if_rxr_livelocked(&sc->rl_ldata.rl_rx_ring); + sc->rl_ldata.rl_rx_considx = i; re_rx_list_fill(sc); - if_input(ifp, &ml); return (rx); } diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 18f30c3065e..0a0a7b7d2aa 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.132 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: xl.c,v 1.133 2020/06/22 02:27:04 dlg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1213,6 +1213,9 @@ again: ml_enqueue(&ml, m); } + if (ifiq_input(&ifp->if_rcv, &ml)) + if_rxr_livelocked(&sc->xl_cdata.xl_rx_ring); + xl_fill_rx_ring(sc); /* @@ -1235,8 +1238,6 @@ again: xl_fill_rx_ring(sc); goto again; } - - if_input(ifp, &ml); } /* |