summaryrefslogtreecommitdiff
path: root/sys/dev/pci/qle.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-02-09 03:15:42 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-02-09 03:15:42 +0000
commit24ad848078fcf32ba92421894c27fa8abb452209 (patch)
tree310b78e8bbf34ba1ceab66cfc2bd1afacecde97b /sys/dev/pci/qle.c
parentb0353336ff6ce726e4e5366de313c7cbf62de3c1 (diff)
we want to defer work traditionally (in openbsd) handled in an
interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future. guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on. this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run. the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too. lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
Diffstat (limited to 'sys/dev/pci/qle.c')
-rw-r--r--sys/dev/pci/qle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index dfebf899200..71019cb03e1 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.33 2015/01/27 03:17:36 dlg Exp $ */
+/* $OpenBSD: qle.c,v 1.34 2015/02/09 03:15:41 dlg Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -625,7 +625,7 @@ qle_attach(struct device *parent, struct device *self, void *aux)
goto free_scratch;
}
- sc->sc_update_taskq = taskq_create(DEVNAME(sc), 1, IPL_BIO);
+ sc->sc_update_taskq = taskq_create(DEVNAME(sc), 1, IPL_BIO, 0);
task_set(&sc->sc_update_task, qle_do_update, sc);
/* wait a bit for link to come up so we can scan and attach devices */