summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-02-20 04:43:59 +0000
committerimp <imp@FreeBSD.org>2001-02-20 04:43:59 +0000
commit186e24ad6b2494564362a9d8c0824ab7c38db682 (patch)
tree112ea489367b76a80315b09b35cfa4677feecabd /sys/pci
parent3a51f790ed16e34cb3c962b06ccd27971cf4a9c4 (diff)
downloadFreeBSD-src-186e24ad6b2494564362a9d8c0824ab7c38db682.zip
FreeBSD-src-186e24ad6b2494564362a9d8c0824ab7c38db682.tar.gz
Take luigi's suggestion and move the check for nothing to do to before the
lock so we don't have lots of null lock/release pairs.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_dc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 94c284b..3b33d11 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2713,13 +2713,12 @@ static void dc_intr(arg)
u_int32_t status;
sc = arg;
- DC_LOCK(sc);
- ifp = &sc->arpcom.ac_if;
- if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0) {
- DC_UNLOCK(sc);
+ if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0)
return ;
- }
+
+ DC_LOCK(sc);
+ ifp = &sc->arpcom.ac_if;
/* Suppress unwanted interrupts */
if (!(ifp->if_flags & IFF_UP)) {
OpenPOWER on IntegriCloud