diff options
author | 2006-11-02 23:43:35 +0000 | |
---|---|---|
committer | 2006-11-02 23:43:35 +0000 | |
commit | 8a2fad4be4bf3686cfced20ee18ef198d583754c (patch) | |
tree | c7d795ee7600b47e24f111f654b0be81a5870de3 | |
parent | comments like "schedule timeout" before going timeout_add are dumb. learn (diff) | |
download | wireguard-openbsd-8a2fad4be4bf3686cfced20ee18ef198d583754c.tar.xz wireguard-openbsd-8a2fad4be4bf3686cfced20ee18ef198d583754c.zip |
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.
-rw-r--r-- | sys/dev/pci/if_vic.c | 5 |
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); |