summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-11-02 23:43:36 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-11-02 23:43:36 +0000
commit61c825b66c84e29fbc73ea8e78b1cfe37c193936 (patch)
treed53b6ba048bca80e55746ff6e6f7d8c5feab3900 /sys/dev
parentf0374ae6b815e64d1c3c1f8e2fa1073149e1ab2c (diff)
if the hardware doesnt say it can do scatter gather lists for tx, then
limit it to one dma segment so it only fills one scatter gather entry.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index b94f0ac9111..70caeb7e63d 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.30 2006/11/02 23:39:22 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.31 2006/11/02 23:43:35 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -611,7 +611,8 @@ vic_init_data(struct vic_softc *sc)
for (i = 0; i < sc->sc_ntxbuf; i++) {
txb = &sc->sc_txbuf[i];
- if (bus_dmamap_create(sc->sc_dmat, MCLBYTES, VIC_SG_MAX,
+ if (bus_dmamap_create(sc->sc_dmat, MCLBYTES,
+ (sc->sc_cap & VIC_CMD_HWCAP_SG) ? VIC_SG_MAX : 1,
MCLBYTES, 0, BUS_DMA_NOWAIT, &txb->txb_dmamap) != 0) {
printf("%s: unable to create dmamap for tx %d\n",
DEVNAME(sc), i);