summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sis.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-07 00:01:43 +0000
committerphk <phk@FreeBSD.org>2005-01-07 00:01:43 +0000
commitedf2752b8237628a2cced5d286191dc18de332d1 (patch)
tree5f801135bb12fd33ad5cf3c5e3c039666936ec65 /sys/pci/if_sis.c
parent2d73390de208369e5a94798d3ddbcec2866d365b (diff)
downloadFreeBSD-src-edf2752b8237628a2cced5d286191dc18de332d1.zip
FreeBSD-src-edf2752b8237628a2cced5d286191dc18de332d1.tar.gz
If we get an interrupt and the interface is down, return before we
grab the lock. This should help a tiny bit on machines where unused if_sis interfaces share IRQ.
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r--sys/pci/if_sis.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index d88cd1d..cce619a 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -1636,6 +1636,9 @@ sis_intr(void *arg)
sc = arg;
ifp = &sc->arpcom.ac_if;
+ if (sc->sis_stopped) /* Most likely shared interrupt */
+ return;
+
SIS_LOCK(sc);
#ifdef DEVICE_POLLING
if (ifp->if_flags & IFF_POLLING)
@@ -1647,12 +1650,6 @@ sis_intr(void *arg)
}
#endif /* DEVICE_POLLING */
- /* Supress unwanted interrupts */
- if (!(ifp->if_flags & IFF_UP)) {
- sis_stop(sc);
- goto done;
- }
-
/* Disable interrupts. */
CSR_WRITE_4(sc, SIS_IER, 0);
@@ -1689,10 +1686,8 @@ sis_intr(void *arg)
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
sis_startl(ifp);
-done:
- SIS_UNLOCK(sc);
- return;
+ SIS_UNLOCK(sc);
}
/*
OpenPOWER on IntegriCloud