if_xl.c (300675f6fc464ea902932e6ee4aa2ac98e3f3c34) | if_xl.c (c6499eccad497913a5025fbde8ae76da70e08043) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 1748 unchanged lines hidden (view full) --- 1757{ 1758 struct mbuf *m_new = NULL; 1759 bus_dmamap_t map; 1760 bus_dma_segment_t segs[1]; 1761 int error, nseg; 1762 1763 XL_LOCK_ASSERT(sc); 1764 | 1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 1748 unchanged lines hidden (view full) --- 1757{ 1758 struct mbuf *m_new = NULL; 1759 bus_dmamap_t map; 1760 bus_dma_segment_t segs[1]; 1761 int error, nseg; 1762 1763 XL_LOCK_ASSERT(sc); 1764 |
1765 m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); | 1765 m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); |
1766 if (m_new == NULL) 1767 return (ENOBUFS); 1768 1769 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; 1770 1771 /* Force longword alignment for packet payload. */ 1772 m_adj(m_new, ETHER_ALIGN); 1773 --- 579 unchanged lines hidden (view full) --- 2353 * Handle special case: we used up all 63 fragments, 2354 * but we have more mbufs left in the chain. Copy the 2355 * data into an mbuf cluster. Note that we don't 2356 * bother clearing the values in the other fragment 2357 * pointers/counters; it wouldn't gain us anything, 2358 * and would waste cycles. 2359 */ 2360 if (error) { | 1766 if (m_new == NULL) 1767 return (ENOBUFS); 1768 1769 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; 1770 1771 /* Force longword alignment for packet payload. */ 1772 m_adj(m_new, ETHER_ALIGN); 1773 --- 579 unchanged lines hidden (view full) --- 2353 * Handle special case: we used up all 63 fragments, 2354 * but we have more mbufs left in the chain. Copy the 2355 * data into an mbuf cluster. Note that we don't 2356 * bother clearing the values in the other fragment 2357 * pointers/counters; it wouldn't gain us anything, 2358 * and would waste cycles. 2359 */ 2360 if (error) { |
2361 m_new = m_collapse(*m_head, M_DONTWAIT, XL_MAXFRAGS); | 2361 m_new = m_collapse(*m_head, M_NOWAIT, XL_MAXFRAGS); |
2362 if (m_new == NULL) { 2363 m_freem(*m_head); 2364 *m_head = NULL; 2365 return (ENOBUFS); 2366 } 2367 *m_head = m_new; 2368 2369 error = bus_dmamap_load_mbuf_sg(sc->xl_mtag, c->xl_map, --- 925 unchanged lines hidden --- | 2362 if (m_new == NULL) { 2363 m_freem(*m_head); 2364 *m_head = NULL; 2365 return (ENOBUFS); 2366 } 2367 *m_head = m_new; 2368 2369 error = bus_dmamap_load_mbuf_sg(sc->xl_mtag, c->xl_map, --- 925 unchanged lines hidden --- |