diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-12-31 14:20:26 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-12-31 14:20:26 +0000 |
commit | 0653ceab238e3bf6f2cf39fb1befce7039d07aa0 (patch) | |
tree | 573868e76fa0f3e498eb9e6b84111bfac2f2368e /sys/dev | |
parent | 4efadd870b4d473544e80b868dcfebb7ccbb4b85 (diff) |
82544 on pcix busses needs a workaround that effectively doubles
the possible number of slots a packet can use on the tx ring.
to make it easier to reserve and account for space on the ring,
half the number of dma descriptors on those chips so the number of
slots can stay the same.
ok claudio@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_em.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index cb3f6427731..6e5498d5dad 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.313 2015/11/25 03:09:59 dlg Exp $ */ +/* $OpenBSD: if_em.c,v 1.314 2015/12/31 14:20:25 dlg Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -2161,8 +2161,8 @@ em_setup_transmit_structures(struct em_softc *sc) tx_buffer = sc->tx_buffer_area; for (i = 0; i < sc->num_tx_desc; i++) { error = bus_dmamap_create(sc->txtag, MAX_JUMBO_FRAME_SIZE, - EM_MAX_SCATTER, MAX_JUMBO_FRAME_SIZE, 0, - BUS_DMA_NOWAIT, &tx_buffer->map); + EM_MAX_SCATTER / (sc->pcix_82544 ? 2 : 1), + MAX_JUMBO_FRAME_SIZE, 0, BUS_DMA_NOWAIT, &tx_buffer->map); if (error != 0) { printf("%s: Unable to create TX DMA map\n", sc->sc_dv.dv_xname); |