svn commit: r315988 - head/sys/dev/iwn

Andriy Voskoboinyk avos at FreeBSD.org
Sun Mar 26 16:46:40 UTC 2017


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);


More information about the svn-src-all mailing list