On Wed, Jun 03, 2015 at 23:14 +0200, mxb wrote:
> 
> Any chance to get this committed?
> Stepped on it once more without this patch.
> 

I'd like to.  OKs?

> //mxb
> 
> On 2015-05-22 19:53, Mike Belopuhov wrote:
> >vmx doesn't check if it's wasn't stopped before calling rx/tx
> >interrupt routines...  the patch below should fix it up.  not
> >entirely sure why do they need to re-enable the interrupt
> >every time, but i'm pretty positive you don't want that if
> >you're !IFF_RUNNING.
> >
> >diff --git sys/dev/pci/if_vmx.c sys/dev/pci/if_vmx.c
> >index 925a977..989cae1 100644
> >--- sys/dev/pci/if_vmx.c
> >+++ sys/dev/pci/if_vmx.c
> >@@ -588,21 +588,24 @@ vmxnet3_disable_all_intrs(struct vmxnet3_softc *sc)
> >  int
> >  vmxnet3_intr(void *arg)
> >  {
> >     struct vmxnet3_softc *sc = arg;
> >+    struct ifnet *ifp = &sc->sc_arpcom.ac_if;
> >     if (READ_BAR1(sc, VMXNET3_BAR1_INTR) == 0)
> >             return 0;
> >     if (sc->sc_ds->event)
> >             vmxnet3_evintr(sc);
> >-    vmxnet3_rxintr(sc, &sc->sc_rxq[0]);
> >-    vmxnet3_txintr(sc, &sc->sc_txq[0]);
> >  #ifdef VMXNET3_STAT
> >     vmxstat.intr++;
> >  #endif
> >-    vmxnet3_enable_intr(sc, 0);
> >+    if (ifp->if_flags & IFF_RUNNING) {
> >+            vmxnet3_rxintr(sc, &sc->sc_rxq[0]);
> >+            vmxnet3_txintr(sc, &sc->sc_txq[0]);
> >+            vmxnet3_enable_intr(sc, 0);
> >+    }
> >     return 1;
> >  }
> >  void
> >  vmxnet3_evintr(struct vmxnet3_softc *sc)
> 

Reply via email to