summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-05-22 06:50:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-05-22 06:50:55 +0000
commitaed7daa2f2c5ec6bbec93f33b167fcba4eaf90bc (patch)
tree4ba7cc68f192ee720d8ddbe13a9f4672e207192d /sys/dev/pci/if_iwm.c
parent032f5fc1b6bceb120469217ff35ce41bf7251786 (diff)
Limit the number of dma segments used for transmitting packets to
IWM_NUM_OF_TBS - 2. We have IWM_NUM_OF_TBS slots, but use two of those for sending commands to the firmware. Hopefully fixes the iwm0: hardware error, stopping device errors I've seen somewhat regularly. ok claudio@, deraadt@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 00ca5329e75..adb334fc623 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.40 2015/05/21 22:13:55 kettenis Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.41 2015/05/22 06:50:54 kettenis Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -1113,7 +1113,8 @@ iwm_alloc_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring, int qid)
paddr += sizeof(struct iwm_device_cmd);
error = bus_dmamap_create(sc->sc_dmat, MCLBYTES,
- IWM_NUM_OF_TBS, MCLBYTES, 0, BUS_DMA_NOWAIT, &data->map);
+ IWM_NUM_OF_TBS - 2, MCLBYTES, 0, BUS_DMA_NOWAIT,
+ &data->map);
if (error != 0) {
printf("%s: could not create TX buf DMA map\n", DEVNAME(sc));
goto fail;