diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2015-12-28 05:49:16 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2015-12-28 05:49:16 +0000 |
commit | 52556b5be220f151ef1c00e3e40e48b656144741 (patch) | |
tree | 8a8c2e7b3e016a702ebe98cff4086363d1f274a9 /sys/dev/pci/if_re_pci.c | |
parent | 07cc2c23d6c69a2fe51d83867966c1dac500754f (diff) |
Rework re_start and re_txeof to only check the producer/consumer ring
positions when deciding how much work to do, and to adjust rl_tx_free with
atomic operations; split the flag that indicates whether we're using
timer based interrupts or not out into a separate field so it can be
changed from interrupt context without needing a lock; take the kernel
lock when calling re_init and re_start from interrupt context; add an
interrupt barrier in re_stop; and finally mark the interrupt handler
as mpsafe.
started by Jim Smith a while ago, mostly finished up at n2k15
tested by dlg@, chris@ and Dimitris Papastamos on various hardware
ok dlg@
Diffstat (limited to 'sys/dev/pci/if_re_pci.c')
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 7fdd8584f09..8a29f45cc93 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.49 2015/11/24 17:11:39 mpi Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.50 2015/12/28 05:49:15 jmatthew Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -156,8 +156,8 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) return; } intrstr = pci_intr_string(pc, ih); - psc->sc_ih = pci_intr_establish(pc, ih, IPL_NET, re_intr, sc, - sc->sc_dev.dv_xname); + psc->sc_ih = pci_intr_establish(pc, ih, IPL_NET | IPL_MPSAFE, re_intr, + sc, sc->sc_dev.dv_xname); if (psc->sc_ih == NULL) { printf(": couldn't establish interrupt"); if (intrstr != NULL) |