summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2018-08-26 06:40:03 +0000
committerjmatthew <jmatthew@openbsd.org>2018-08-26 06:40:03 +0000
commit03373e89b7be9cc711ec048ac4efdbd4e7450110 (patch)
tree449b24a042c523e779c59bb361cd38c742387ef2
parentsync (diff)
downloadwireguard-openbsd-03373e89b7be9cc711ec048ac4efdbd4e7450110.tar.xz
wireguard-openbsd-03373e89b7be9cc711ec048ac4efdbd4e7450110.zip
return -1 from the interrupt handler if we didn't find any work to do
-rw-r--r--sys/dev/pci/if_bnxt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c
index 6f3fe0fdcf0..b24c3abf107 100644
--- a/sys/dev/pci/if_bnxt.c
+++ b/sys/dev/pci/if_bnxt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnxt.c,v 1.9 2018/08/24 12:35:10 jmatthew Exp $ */
+/* $OpenBSD: if_bnxt.c,v 1.10 2018/08/26 06:40:03 jmatthew Exp $ */
/*-
* Broadcom NetXtreme-C/E network driver.
*
@@ -1147,7 +1147,7 @@ bnxt_intr(void *xsc)
uint32_t cons, last_cons;
int v_bit, last_v_bit;
uint16_t type;
- int rxfree, txfree;
+ int rxfree, txfree, rv;
cons = cpr->cons;
v_bit = cpr->v_bit;
@@ -1155,6 +1155,7 @@ bnxt_intr(void *xsc)
bnxt_write_cp_doorbell(sc, &cpr->ring, 0);
rxfree = 0;
txfree = 0;
+ rv = -1;
for (;;) {
last_cons = cons;
last_v_bit = v_bit;
@@ -1184,6 +1185,7 @@ bnxt_intr(void *xsc)
printf("%s: unexpected completion type %u\n",
DEVNAME(sc), type);
}
+ rv = 1;
}
cpr->cons = last_cons;
@@ -1213,7 +1215,7 @@ bnxt_intr(void *xsc)
if (ifq_is_oactive(&ifp->if_snd))
ifq_restart(&ifp->if_snd);
}
- return (1);
+ return (rv);
}
void