From owner-svn-src-stable@freebsd.org Mon May 7 20:41:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9C54FBC5F6; Mon, 7 May 2018 20:41:24 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97FFC68970; Mon, 7 May 2018 20:41:24 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79899205CA; Mon, 7 May 2018 20:41:24 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w47KfOHQ008645; Mon, 7 May 2018 20:41:24 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w47KfOsk008644; Mon, 7 May 2018 20:41:24 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201805072041.w47KfOsk008644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Mon, 7 May 2018 20:41:24 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: stable/11/sys/dev/ixl X-SVN-Commit-Revision: 333331 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 20:41:25 -0000 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,