ixl_txrx.c (d60840138f6292c1ceeb177ebe797eca0b2749da) | ixl_txrx.c (ac83ea833d494a651c3fa807c90675b724a78c19) |
---|---|
1/****************************************************************************** 2 3 Copyright (c) 2013-2015, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 --- 272 unchanged lines hidden (view full) --- 281 * Map the packet for DMA. 282 */ 283 error = bus_dmamap_load_mbuf_sg(tag, map, 284 *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); 285 286 if (error == EFBIG) { 287 struct mbuf *m; 288 | 1/****************************************************************************** 2 3 Copyright (c) 2013-2015, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 --- 272 unchanged lines hidden (view full) --- 281 * Map the packet for DMA. 282 */ 283 error = bus_dmamap_load_mbuf_sg(tag, map, 284 *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); 285 286 if (error == EFBIG) { 287 struct mbuf *m; 288 |
289 m = m_defrag(*m_headp, M_NOWAIT); | 289 m = m_collapse(*m_headp, M_NOWAIT, maxsegs); |
290 if (m == NULL) { 291 que->mbuf_defrag_failed++; 292 m_freem(*m_headp); 293 *m_headp = NULL; 294 return (ENOBUFS); 295 } 296 *m_headp = m; 297 --- 87 unchanged lines hidden (view full) --- 385 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); 386 /* 387 * Advance the Transmit Descriptor Tail (Tdt), this tells the 388 * hardware that this frame is available to transmit. 389 */ 390 ++txr->total_packets; 391 wr32(hw, txr->tail, i); 392 | 290 if (m == NULL) { 291 que->mbuf_defrag_failed++; 292 m_freem(*m_headp); 293 *m_headp = NULL; 294 return (ENOBUFS); 295 } 296 *m_headp = m; 297 --- 87 unchanged lines hidden (view full) --- 385 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); 386 /* 387 * Advance the Transmit Descriptor Tail (Tdt), this tells the 388 * hardware that this frame is available to transmit. 389 */ 390 ++txr->total_packets; 391 wr32(hw, txr->tail, i); 392 |
393 ixl_flush(hw); |
|
393 /* Mark outstanding work */ 394 if (que->busy == 0) 395 que->busy = 1; 396 return (0); 397 398xmit_fail: 399 bus_dmamap_unload(tag, buf->map); 400 return (error); --- 1427 unchanged lines hidden --- | 394 /* Mark outstanding work */ 395 if (que->busy == 0) 396 que->busy = 1; 397 return (0); 398 399xmit_fail: 400 bus_dmamap_unload(tag, buf->map); 401 return (error); --- 1427 unchanged lines hidden --- |