From bf2556cfad12b040393aa6a33ea80a5adb0b51d6 Mon Sep 17 00:00:00 2001 From: luigi Date: Fri, 14 Dec 2001 05:56:35 +0000 Subject: Remove printf's on mbuf/cluster allocation failures. There are now equivalent and less dangerous (rate limited) messages in the mbuf allocation code. MFC after: 3 days --- sys/pci/if_wb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'sys/pci/if_wb.c') diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index be60876..cd1d43f 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -1092,11 +1092,8 @@ static int wb_newbuf(sc, c, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("wb%d: no memory for rx " - "list -- packet dropped!\n", sc->wb_unit); + if (m_new == NULL) return(ENOBUFS); - } m_new->m_data = c->wb_buf; m_new->m_pkthdr.len = m_new->m_len = WB_BUFBYTES; MEXTADD(m_new, c->wb_buf, WB_BUFBYTES, wb_bfree, NULL, 0, @@ -1448,16 +1445,12 @@ static int wb_encap(sc, c, m_head) struct mbuf *m_new = NULL; MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("wb%d: no memory for tx list", sc->wb_unit); + if (m_new == NULL) return(1); - } if (m_head->m_pkthdr.len > MHLEN) { MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("wb%d: no memory for tx list", - sc->wb_unit); return(1); } } -- cgit v1.1