From 3b1bf8c2e9222b7d27e8b9084e637a84005de7ba Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 25 Mar 2008 09:39:02 +0000 Subject: Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation. --- sys/dev/firewire/if_fwip.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'sys/dev/firewire/if_fwip.c') diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index a9d1f38..b99e378 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -332,19 +332,11 @@ fwip_init(void *arg) STAILQ_INIT(&xferq->stdma); xferq->stproc = NULL; for (i = 0; i < xferq->bnchunk; i ++) { - m = -#if defined(__DragonFly__) || __FreeBSD_version < 500000 - m_getcl(M_WAIT, MT_DATA, M_PKTHDR); -#else - m_getcl(M_TRYWAIT, MT_DATA, M_PKTHDR); -#endif + m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); xferq->bulkxfer[i].mbuf = m; - if (m != NULL) { - m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; - STAILQ_INSERT_TAIL(&xferq->stfree, - &xferq->bulkxfer[i], link); - } else - printf("fwip_as_input: m_getcl failed\n"); + m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; + STAILQ_INSERT_TAIL(&xferq->stfree, + &xferq->bulkxfer[i], link); } fwip->fwb.start = INET_FIFO; @@ -356,7 +348,7 @@ fwip_init(void *arg) xfer = fw_xfer_alloc(M_FWIP); if (xfer == NULL) break; - m = m_getcl(M_TRYWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); xfer->recv.payload = mtod(m, uint32_t *); xfer->recv.pay_len = MCLBYTES; xfer->hand = fwip_unicast_input; @@ -876,7 +868,7 @@ fwip_unicast_input_recycle(struct fwip_softc *fwip, struct fw_xfer *xfer) * We have finished with a unicast xfer. Allocate a new * cluster and stick it on the back of the input queue. */ - m = m_getcl(M_TRYWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); xfer->mbuf = m; xfer->recv.payload = mtod(m, uint32_t *); xfer->recv.pay_len = MCLBYTES; -- cgit v1.1