summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/socppc/dev/if_tsec.c12
-rw-r--r--sys/arch/sparc64/dev/vnet.c12
2 files changed, 7 insertions, 17 deletions
diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c
index bca792b7a21..ca377948d2d 100644
--- a/sys/arch/socppc/dev/if_tsec.c
+++ b/sys/arch/socppc/dev/if_tsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tsec.c,v 1.22 2009/02/22 20:03:19 kettenis Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.23 2009/08/09 11:40:58 deraadt Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -1196,15 +1196,9 @@ tsec_alloc_mbuf(struct tsec_softc *sc, bus_dmamap_t map)
{
struct mbuf *m = NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == NULL)
+ m = MCLGETI(NULL, M_DONTWAIT, &sc->sc_ac.ac_if, MCLBYTES);
+ if (!m)
return (NULL);
-
- MCLGETI(m, M_DONTWAIT, &sc->sc_ac.ac_if, MCLBYTES);
- if ((m->m_flags & M_EXT) == 0) {
- m_freem(m);
- return (NULL);
- }
m->m_len = m->m_pkthdr.len = MCLBYTES;
if (bus_dmamap_load_mbuf(sc->sc_dmat, map, m, BUS_DMA_NOWAIT) != 0) {
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c
index 0364bddfa7f..c7cac05fbf9 100644
--- a/sys/arch/sparc64/dev/vnet.c
+++ b/sys/arch/sparc64/dev/vnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnet.c,v 1.16 2009/05/12 21:33:38 kettenis Exp $ */
+/* $OpenBSD: vnet.c,v 1.17 2009/08/09 11:40:58 deraadt Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -681,14 +681,10 @@ vnet_rx_vio_dring_data(struct vnet_softc *sc, struct vio_msg_tag *tag)
if (desc.hdr.dstate != VIO_DESC_READY)
break;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if(m == NULL)
+ m = MCLGETI(NULL, M_DONTWAIT, &sc->sc_ac.ac_if,
+ MCLBYTES);
+ if (!m)
break;
- MCLGETI(m, M_DONTWAIT, &sc->sc_ac.ac_if, MCLBYTES);
- if ((m->m_flags & M_EXT) == 0) {
- m_freem(m);
- break;
- }
ifp->if_ipackets++;
m->m_pkthdr.rcvif = ifp;
m->m_len = m->m_pkthdr.len = desc.nbytes;