diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-11-08 12:21:37 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-11-08 12:21:37 +0000 |
commit | 09cbf9d3a9c1d6e9a0bfa2da484d1cdd09a8cbc3 (patch) | |
tree | aa8938aef01f62109b71933b0ed643bb7c30e2f1 /sys/dev/pci/if_wpi.c | |
parent | d90109f38b6609376dd40bf88d7a805169e97a5a (diff) |
do not allocate cmd memory for rings 5 and 6 (HCCA) which are unused.
Diffstat (limited to 'sys/dev/pci/if_wpi.c')
-rw-r--r-- | sys/dev/pci/if_wpi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index 360b382a721..7a4cccddacd 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.66 2008/11/08 11:02:09 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.67 2008/11/08 12:21:36 damien Exp $ */ /*- * Copyright (c) 2006-2008 @@ -785,6 +785,14 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, struct wpi_tx_ring *ring, int qid) /* Update shared area with ring's physical address. */ sc->shared->txbase[qid] = htole32(ring->desc_dma.paddr); + /* + * We only use rings 0 through 4 (4 EDCA + cmd) so there is no need + * to allocate commands space for other rings. + * XXX Do we really need to allocate descriptors for other rings? + */ + if (qid > 4) + return 0; + size = WPI_TX_RING_COUNT * sizeof (struct wpi_tx_cmd); error = wpi_dma_contig_alloc(sc->sc_dmat, &ring->cmd_dma, (void **)&ring->cmd, size, 4, BUS_DMA_NOWAIT); |