summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe
diff options
context:
space:
mode:
authorerj <erj@FreeBSD.org>2015-04-01 17:19:55 +0000
committererj <erj@FreeBSD.org>2015-04-01 17:19:55 +0000
commited03b6d5102f3b90b14d8f51eaeeab10f558a170 (patch)
tree7ade23e98cf5c7284001b3b5711f866e3dd6a69e /sys/dev/ixgbe
parent6438112ad817280dc9b6d925e020ce42d646a2e0 (diff)
downloadFreeBSD-src-ed03b6d5102f3b90b14d8f51eaeeab10f558a170.zip
FreeBSD-src-ed03b6d5102f3b90b14d8f51eaeeab10f558a170.tar.gz
Make changes to busdma code in tx/rx path similar to the ones made in r257541.
- bus_dmamap_create() does not take the BUS_DMA_NOWAIT flag - properly unload maps - do not assign NULL to dma map pointers Submitted by: Konstantin Belousov <kostikbel@gmail.com> Approved by: jfv (mentor) MFC after: 1 week
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r--sys/dev/ixgbe/ix_txrx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c
index 536bf9f..6c9c84a 100644
--- a/sys/dev/ixgbe/ix_txrx.c
+++ b/sys/dev/ixgbe/ix_txrx.c
@@ -1049,7 +1049,6 @@ ixgbe_txeof(struct tx_ring *txr)
buf->map);
m_freem(buf->m_head);
buf->m_head = NULL;
- buf->map = NULL;
}
buf->eop = NULL;
++txr->tx_avail;
@@ -1075,7 +1074,6 @@ ixgbe_txeof(struct tx_ring *txr)
buf->map);
m_freem(buf->m_head);
buf->m_head = NULL;
- buf->map = NULL;
}
++txr->tx_avail;
buf->eop = NULL;
@@ -1319,6 +1317,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit)
*/
if ((rxbuf->flags & IXGBE_RX_COPY) == 0) {
/* Get the memory mapping */
+ bus_dmamap_unload(rxr->ptag, rxbuf->pmap);
error = bus_dmamap_load_mbuf_sg(rxr->ptag,
rxbuf->pmap, mp, seg, &nsegs, BUS_DMA_NOWAIT);
if (error != 0) {
@@ -1395,8 +1394,7 @@ ixgbe_allocate_receive_buffers(struct rx_ring *rxr)
for (i = 0; i < rxr->num_desc; i++, rxbuf++) {
rxbuf = &rxr->rx_buffers[i];
- error = bus_dmamap_create(rxr->ptag,
- BUS_DMA_NOWAIT, &rxbuf->pmap);
+ error = bus_dmamap_create(rxr->ptag, 0, &rxbuf->pmap);
if (error) {
device_printf(dev, "Unable to create RX dma map\n");
goto fail;
@@ -1715,6 +1713,7 @@ ixgbe_rx_discard(struct rx_ring *rxr, int i)
m_free(rbuf->buf);
rbuf->buf = NULL;
}
+ bus_dmamap_unload(rxr->ptag, rbuf->pmap);
rbuf->flags = 0;
OpenPOWER on IntegriCloud