summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-10-03 06:36:11 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-10-03 06:36:11 +0000
commit4109ce576c236d542a08dd84bcb68bf73709d89b (patch)
treef480966a33b3a70868f435cc183f55363e2c2e60 /sys/dev
parent6b62fa4cf94ee2f9af775c53a5f386d84da400ec (diff)
dont take the kernel lock on every interrupt in case we might change
the link state or to clear OACTIVE, just take it when we know we really are going to do those things.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_myx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c
index 4d2cb4c4469..a7e8712108e 100644
--- a/sys/dev/pci/if_myx.c
+++ b/sys/dev/pci/if_myx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_myx.c,v 1.64 2014/09/14 14:17:25 jsg Exp $ */
+/* $OpenBSD: if_myx.c,v 1.65 2014/10/03 06:36:10 dlg Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -1716,15 +1716,18 @@ myx_intr(void *arg)
return (1);
}
- KERNEL_LOCK();
- if (link != 0xffffffff)
+ if (link != 0xffffffff) {
+ KERNEL_LOCK();
myx_link_state(sc, link);
+ KERNEL_UNLOCK();
+ }
if (ISSET(ifp->if_flags, IFF_OACTIVE)) {
+ KERNEL_LOCK();
CLR(ifp->if_flags, IFF_OACTIVE);
myx_start(ifp);
+ KERNEL_UNLOCK();
}
- KERNEL_UNLOCK();
for (i = 0; i < 2; i++) {
if (ISSET(refill, 1 << i)) {