From 18063d10db7b3b6877071db4b06d4871a20d1fac Mon Sep 17 00:00:00 2001 From: harti Date: Wed, 5 Nov 2003 11:15:47 +0000 Subject: Initialize the USED flag in new external receive buffers to 0, not to 1. We put them directly onto the free list instead of calling the external mbuf free routine (that routine would have cleaned the flag). This fixes a bug which manifests itself in falsely reporting a lot of used buffers when configuring the interface down. --- sys/dev/hatm/if_hatm_intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/hatm') diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index bcc42d6..4e9582a 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -231,7 +231,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group) for (i = 0; i < MBUF0_PER_PAGE; i++, c++) { c->hdr.pageno = sc->mbuf_npages; c->hdr.chunkno = i; - c->hdr.flags = MBUF_USED; + c->hdr.flags = 0; hatm_ext_free(&sc->mbuf_list[0], (struct mbufx_free *)c); } @@ -246,7 +246,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group) for (i = 0; i < MBUF1_PER_PAGE; i++, c++) { c->hdr.pageno = sc->mbuf_npages; c->hdr.chunkno = i; - c->hdr.flags = MBUF_USED; + c->hdr.flags = 0; hatm_ext_free(&sc->mbuf_list[1], (struct mbufx_free *)c); } -- cgit v1.1