From 11098d3bad179feb30248af23c90e5df877d36f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Thu, 16 Mar 1995 17:41:20 +0000 Subject: [PATCH] Prepare for shared interrupts (required by the new PCI code that adds support for PCI PCI bridges, e.g. found on 4ch. Ethernet cards). Submitted by: Wolfgang Stanglmeier --- sys/dev/de/if_de.c | 8 ++++++-- sys/pci/if_de.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 1c332dc9362d..d413c94f4f35 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_de.c,v 1.15 1995/02/02 13:12:13 davidg Exp $ + * $Id: if_de.c,v 1.16 1995/02/10 06:06:42 davidg Exp $ * */ @@ -35,6 +35,7 @@ * board which support DC21040. */ +#define IF_DE_C_PATCHLEVEL "pl1 95/03/09" #include "de.h" #if NDE > 0 @@ -47,6 +48,7 @@ #include #include #include +#include /* only for declaration of wakeup() used by vm.h */ #include #include @@ -661,8 +663,10 @@ tulip_intr( tulip_softc_t *sc) { tulip_uint32_t csr; + int active=0; while ((csr = *sc->tulip_csrs.csr_status) & (TULIP_STS_NORMALINTR|TULIP_STS_ABNRMLINTR)) { + active=1; *sc->tulip_csrs.csr_status = csr & sc->tulip_intrmask; if (csr & TULIP_STS_SYSERROR) { @@ -684,7 +688,7 @@ tulip_intr( tulip_start(&sc->tulip_if); } } - return 1; + return (active); } /* diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 1c332dc9362d..d413c94f4f35 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_de.c,v 1.15 1995/02/02 13:12:13 davidg Exp $ + * $Id: if_de.c,v 1.16 1995/02/10 06:06:42 davidg Exp $ * */ @@ -35,6 +35,7 @@ * board which support DC21040. */ +#define IF_DE_C_PATCHLEVEL "pl1 95/03/09" #include "de.h" #if NDE > 0 @@ -47,6 +48,7 @@ #include #include #include +#include /* only for declaration of wakeup() used by vm.h */ #include #include @@ -661,8 +663,10 @@ tulip_intr( tulip_softc_t *sc) { tulip_uint32_t csr; + int active=0; while ((csr = *sc->tulip_csrs.csr_status) & (TULIP_STS_NORMALINTR|TULIP_STS_ABNRMLINTR)) { + active=1; *sc->tulip_csrs.csr_status = csr & sc->tulip_intrmask; if (csr & TULIP_STS_SYSERROR) { @@ -684,7 +688,7 @@ tulip_intr( tulip_start(&sc->tulip_if); } } - return 1; + return (active); } /*