Date: Mon, 7 May 2018 20:41:24 +0000 (UTC) From: Eric Joyner <erj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r333331 - stable/11/sys/dev/ixl Message-ID: <201805072041.w47KfOsk008644@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: erj Date: Mon May 7 20:41:24 2018 New Revision: 333331 URL: https://svnweb.freebsd.org/changeset/base/333331 Log: MFC r319797, r320972: r319797: ixl(4)/ixlv(4): Fix some busdma tags and improper map NULL. r320972: ixl(4)/ixlv(4): Stop leaking every busdma entry in receive path Approved by: re (marius) Modified: stable/11/sys/dev/ixl/ixl_txrx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/11/sys/dev/ixl/ixl_txrx.c Mon May 7 20:38:09 2018 (r333330) +++ stable/11/sys/dev/ixl/ixl_txrx.c Mon May 7 20:41:24 2018 (r333331) @@ -428,7 +428,7 @@ ixl_allocate_tx_data(struct ixl_queue *que) /* * Setup DMA descriptor areas. */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -445,7 +445,7 @@ ixl_allocate_tx_data(struct ixl_queue *que) } /* Make a special tag for TSO */ - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -930,7 +930,6 @@ ixl_txeof(struct ixl_queue *que) buf->map); m_freem(buf->m_head); buf->m_head = NULL; - buf->map = NULL; } buf->eop_index = -1; @@ -1093,7 +1092,7 @@ ixl_allocate_rx_data(struct ixl_queue *que) return (error); } - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1109,7 +1108,7 @@ ixl_allocate_rx_data(struct ixl_queue *que) return (error); } - if ((error = bus_dma_tag_create(NULL, /* parent */ + if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1575,6 +1574,18 @@ ixl_rxeof(struct ixl_queue *que, int count) vtag = le16toh(cur->wb.qword0.lo_dword.l2tag1); else vtag = 0; + + /* Remove device access to the rx buffers. */ + if (rbuf->m_head != NULL) { + bus_dmamap_sync(rxr->htag, rbuf->hmap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(rxr->htag, rbuf->hmap); + } + if (rbuf->m_pack != NULL) { + bus_dmamap_sync(rxr->ptag, rbuf->pmap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(rxr->ptag, rbuf->pmap); + } /* ** Make sure bad packets are discarded,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805072041.w47KfOsk008644>