From: dlg Date: Sun, 30 Jul 2023 01:15:42 +0000 (+0000) Subject: post tx ring producer updates to each rings own txh register. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7678612e0cb2422e6a5b1e72bc670f52f7309513;p=openbsd post tx ring producer updates to each rings own txh register. before this change all the different ring producer updates were posted to ring 0. --- diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index 0ce506d5542..5053e6be230 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.70 2022/09/11 08:38:39 yasuoka Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.71 2023/07/30 01:15:42 dlg Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -101,6 +101,7 @@ struct vmxnet3_txqueue { struct vmxnet3_txq_shared *ts; struct ifqueue *ifq; struct kstat *txkstat; + unsigned int queue; } __aligned(64); struct vmxnet3_rxqueue { @@ -535,6 +536,8 @@ vmxnet3_alloc_txring(struct vmxnet3_softc *sc, int queue, int intr) bus_addr_t pa, comp_pa; int idx; + tq->queue = queue; + ring->txd = vmxnet3_dma_allocmem(sc, NTXDESC * sizeof ring->txd[0], 512, &pa); if (ring->txd == NULL) return -1; @@ -1405,7 +1408,7 @@ vmxnet3_start(struct ifqueue *ifq) ring->prod = prod; ring->gen = rgen; - WRITE_BAR0(sc, VMXNET3_BAR0_TXH(0), prod); + WRITE_BAR0(sc, VMXNET3_BAR0_TXH(tq->queue), prod); } void