Date: Sun, 26 Mar 2017 16:46:39 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315988 - head/sys/dev/iwn Message-ID: <201703261646.v2QGkdj7071930@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703261646.v2QGkdj7071930>