Date: Sun, 15 May 2011 08:09:36 +0000 (UTC) From: Bernhard Schmidt <bschmidt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221945 - head/sys/dev/iwn Message-ID: <201105150809.p4F89aHK029975@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bschmidt Date: Sun May 15 08:09:36 2011 New Revision: 221945 URL: http://svn.freebsd.org/changeset/base/221945 Log: Only update the scheduler's byte count table for aggregation queues. The other queues, especially the command queue, uses the FIFO mode which doesn't require the byte count table because queued entries are processed in order. Pointed out by: Lucius Windschuh <lwindschuh at googlemail dot com> Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun May 15 07:59:33 2011 (r221944) +++ head/sys/dev/iwn/if_iwn.c Sun May 15 08:09:36 2011 (r221945) @@ -3527,7 +3527,8 @@ iwn_tx_data(struct iwn_softc *sc, struct BUS_DMASYNC_PREWRITE); /* Update TX scheduler. */ - ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); + if (ring->qid >= sc->firstaggqueue) + ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); /* Kick TX ring. */ ring->cur = (ring->cur + 1) % IWN_TX_RING_COUNT; @@ -3730,7 +3731,8 @@ iwn_tx_data_raw(struct iwn_softc *sc, st BUS_DMASYNC_PREWRITE); /* Update TX scheduler. */ - ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); + if (ring->qid >= sc->firstaggqueue) + ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); /* Kick TX ring. */ ring->cur = (ring->cur + 1) % IWN_TX_RING_COUNT; @@ -3894,7 +3896,6 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, static int iwn_cmd(struct iwn_softc *sc, int code, const void *buf, int size, int async) { - struct iwn_ops *ops = &sc->ops; struct iwn_tx_ring *ring = &sc->txq[4]; struct iwn_tx_desc *desc; struct iwn_tx_data *data; @@ -3954,9 +3955,6 @@ iwn_cmd(struct iwn_softc *sc, int code, bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - /* Update TX scheduler. */ - ops->update_sched(sc, ring->qid, ring->cur, 0, 0); - /* Kick command ring. */ ring->cur = (ring->cur + 1) % IWN_TX_RING_COUNT; IWN_WRITE(sc, IWN_HBUS_TARG_WRPTR, ring->qid << 8 | ring->cur);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105150809.p4F89aHK029975>