summaryrefslogtreecommitdiff
path: root/sys/arch/armv7
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-16 16:21:22 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-16 16:21:22 +0000
commitfdadf5cc6c6647c12eccf9055602d1d6dd7a6d0b (patch)
tree0db671241dc229d1dd484fef5ce54ce5f83a97e1 /sys/arch/armv7
parentdb0f5f8b18c7ed65ebad8d451f2abd4682065301 (diff)
Convert to if_input(), tested by jsg@.
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r--sys/arch/armv7/omap/if_cpsw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c
index b720b754328..b32bb0e84df 100644
--- a/sys/arch/armv7/omap/if_cpsw.c
+++ b/sys/arch/armv7/omap/if_cpsw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cpsw.c,v 1.24 2014/12/22 02:26:53 tedu Exp $ */
+/* $OpenBSD: if_cpsw.c,v 1.25 2015/03/16 16:21:21 mpi Exp $ */
/* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */
/*
@@ -977,6 +977,7 @@ cpsw_rxintr(void *arg)
struct cpsw_ring_data * const rdp = sc->sc_rdp;
struct cpsw_cpdma_bd bd;
bus_dmamap_t dm;
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct mbuf *m;
u_int i;
u_int len, off;
@@ -998,7 +999,7 @@ cpsw_rxintr(void *arg)
if (bd.flags & CPDMA_BD_TDOWNCMPLT) {
sc->sc_rxrun = false;
- return 1;
+ goto done;
}
if ((bd.flags & (CPDMA_BD_SOP|CPDMA_BD_EOP)) !=
@@ -1022,17 +1023,12 @@ cpsw_rxintr(void *arg)
if (bd.flags & CPDMA_BD_PASSCRC)
len -= ETHER_CRC_LEN;
- m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = len;
m->m_data += off;
ifp->if_ipackets++;
-#if NBPFILTER > 0
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
-#endif
- ether_input_mbuf(ifp, m);
+ ml_enqueue(&ml, m);
next:
sc->sc_rxhead = RXDESC_NEXT(sc->sc_rxhead);
@@ -1051,7 +1047,11 @@ next:
/* Debugger(); */
}
- bus_space_write_4(sc->sc_bst, sc->sc_bsh, CPSW_CPDMA_CPDMA_EOI_VECTOR, CPSW_INTROFF_RX);
+ bus_space_write_4(sc->sc_bst, sc->sc_bsh, CPSW_CPDMA_CPDMA_EOI_VECTOR,
+ CPSW_INTROFF_RX);
+
+done:
+ if_input(ifp, &ml);
return 1;
}