Index: if_fxp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v retrieving revision 1.180 diff -u -r1.180 if_fxp.c --- if_fxp.c 25 May 2003 05:04:26 -0000 1.180 +++ if_fxp.c 1 Jun 2003 10:28:41 -0000 @@ -1395,25 +1395,17 @@ * We ran out of segments. We have to recopy this * mbuf chain first. Bail out if we can't get the * new buffers. + * + * The m_defrag routine keeps the chain intact + * if it's not of the type M_PKTHDR. */ - MGETHDR(mn, M_DONTWAIT, MT_DATA); + mn = m_defrag(mb_head, M_DONTWAIT); if (mn == NULL) { m_freem(mb_head); break; + } else { + mb_head = mn; } - if (mb_head->m_pkthdr.len > MHLEN) { - MCLGET(mn, M_DONTWAIT); - if ((mn->m_flags & M_EXT) == 0) { - m_freem(mn); - m_freem(mb_head); - break; - } - } - m_copydata(mb_head, 0, mb_head->m_pkthdr.len, - mtod(mn, caddr_t)); - mn->m_pkthdr.len = mn->m_len = mb_head->m_pkthdr.len; - m_freem(mb_head); - mb_head = mn; error = bus_dmamap_load_mbuf(sc->fxp_mtag, txp->tx_map, mb_head, fxp_dma_map_txbuf, sc, 0); if (error) {