From owner-svn-src-all@freebsd.org Sun Mar 26 16:46:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E7E3D1E605; Sun, 26 Mar 2017 16:46:40 +0000 (UTC) (envelope-from avos@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 mx1.freebsd.org (Postfix) with ESMTPS id 30B911BC1; Sun, 26 Mar 2017 16:46:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2QGkdCY071931; Sun, 26 Mar 2017 16:46:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2QGkdj7071930; Sun, 26 Mar 2017 16:46:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201703261646.v2QGkdj7071930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 26 Mar 2017 16:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315988 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 16:46:40 -0000 Author: avos Date: Sun Mar 26 16:46:39 2017 New Revision: 315988 URL: https://svnweb.freebsd.org/changeset/base/315988 Log: iwn: drop unneeded bus_dmamap_sync() calls. 1) They are using wrong tag (Tx) + map (Rx) combination. 2) Rx descriptor is already synchronized in iwn_notif_intr() 3) It's not needed for transmitted data since device does not change mbuf contents. Tested with Intel 6205 (amd64), STA mode. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Mar 26 14:37:12 2017 (r315987) +++ head/sys/dev/iwn/if_iwn.c Sun Mar 26 16:46:39 2017 (r315988) @@ -3516,11 +3516,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st struct iwn_rx_data *data) { struct iwn4965_tx_stat *stat = (struct iwn4965_tx_stat *)(desc + 1); - struct iwn_tx_ring *ring; - int qid; - - qid = desc->qid & 0xf; - ring = &sc->txq[qid]; + int qid = desc->qid & 0xf; DPRINTF(sc, IWN_DEBUG_XMIT, "%s: " "qid %d idx %d RTS retries %d ACK retries %d nkill %d rate %x duration %d status %x\n", @@ -3531,7 +3527,6 @@ iwn4965_tx_done(struct iwn_softc *sc, st stat->rate, le16toh(stat->duration), le32toh(stat->status)); - bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); if (qid >= sc->firstaggqueue) { iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, stat->rtsfailcnt, stat->ackfailcnt, &stat->status); @@ -3546,11 +3541,7 @@ iwn5000_tx_done(struct iwn_softc *sc, st struct iwn_rx_data *data) { struct iwn5000_tx_stat *stat = (struct iwn5000_tx_stat *)(desc + 1); - struct iwn_tx_ring *ring; - int qid; - - qid = desc->qid & 0xf; - ring = &sc->txq[qid]; + int qid = desc->qid & 0xf; DPRINTF(sc, IWN_DEBUG_XMIT, "%s: " "qid %d idx %d RTS retries %d ACK retries %d nkill %d rate %x duration %d status %x\n", @@ -3566,7 +3557,6 @@ iwn5000_tx_done(struct iwn_softc *sc, st iwn5000_reset_sched(sc, desc->qid & 0xf, desc->idx); #endif - bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); if (qid >= sc->firstaggqueue) { iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, stat->rtsfailcnt, stat->ackfailcnt, &stat->status);