summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-11-14 12:24:19 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-11-14 12:24:19 +0000
commitd2a95eecc685b61b97ff60c73a7d1d154cd4ac53 (patch)
tree7e65bcd1545f53ee4f211fd494cf992dd6a73f33
parent6b96931fa4095980a33cb4f66e44c65b93b1b412 (diff)
replace workqs with tasks for handling resume
from kimberley manning
-rw-r--r--sys/dev/cardbus/if_pgt_cardbus.c4
-rw-r--r--sys/dev/ic/pgt.c9
-rw-r--r--sys/dev/ic/pgtvar.h4
-rw-r--r--sys/dev/pci/if_pgt_pci.c4
4 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/cardbus/if_pgt_cardbus.c b/sys/dev/cardbus/if_pgt_cardbus.c
index ebf13d2f8ac..162ddd6ad70 100644
--- a/sys/dev/cardbus/if_pgt_cardbus.c
+++ b/sys/dev/cardbus/if_pgt_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pgt_cardbus.c,v 1.13 2010/09/06 19:20:21 deraadt Exp $ */
+/* $OpenBSD: if_pgt_cardbus.c,v 1.14 2013/11/14 12:24:18 dlg Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
@@ -31,7 +31,7 @@
#include <sys/malloc.h>
#include <sys/timeout.h>
#include <sys/device.h>
-#include <sys/workq.h>
+#include <sys/task.h>
#include <machine/bus.h>
#include <machine/intr.h>
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index a262a5306a7..81bdb46f56e 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.71 2013/10/01 20:05:59 sf Exp $ */
+/* $OpenBSD: pgt.c,v 1.72 2013/11/14 12:24:18 dlg Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -58,7 +58,7 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/device.h>
-#include <sys/workq.h>
+#include <sys/task.h>
#include <machine/bus.h>
#include <machine/endian.h>
@@ -580,6 +580,8 @@ pgt_attach(void *xsc)
//sc->sc_debug |= SC_DEBUG_RXFRAG;
//sc->sc_debug |= SC_DEBUG_RXETHER;
+ task_set(&sc->sc_resume_t, pgt_resume, sc, NULL);
+
/* enable card if possible */
if (sc->sc_enable != NULL)
(*sc->sc_enable)(sc);
@@ -3297,8 +3299,7 @@ pgt_activate(struct device *self, int act)
(*sc->sc_power)(sc, act);
break;
case DVACT_RESUME:
- workq_queue_task(NULL, &sc->sc_resume_wqt, 0,
- pgt_resume, sc, NULL);
+ task_add(systq, &sc->sc_resume_t);
break;
}
return 0;
diff --git a/sys/dev/ic/pgtvar.h b/sys/dev/ic/pgtvar.h
index c3c536b329c..ef50f7b1b41 100644
--- a/sys/dev/ic/pgtvar.h
+++ b/sys/dev/ic/pgtvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgtvar.h,v 1.14 2011/07/03 21:11:33 dhill Exp $ */
+/* $OpenBSD: pgtvar.h,v 1.15 2013/11/14 12:24:18 dlg Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -209,7 +209,7 @@ struct pgt_softc {
int sc_txtap_len;
#endif
- struct workq_task sc_resume_wqt;
+ struct task sc_resume_t;
};
int pgt_intr(void *);
diff --git a/sys/dev/pci/if_pgt_pci.c b/sys/dev/pci/if_pgt_pci.c
index 567ad03570c..313c49729e0 100644
--- a/sys/dev/pci/if_pgt_pci.c
+++ b/sys/dev/pci/if_pgt_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pgt_pci.c,v 1.13 2010/08/27 20:06:39 deraadt Exp $ */
+/* $OpenBSD: if_pgt_pci.c,v 1.14 2013/11/14 12:24:18 dlg Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
@@ -31,7 +31,7 @@
#include <sys/malloc.h>
#include <sys/timeout.h>
#include <sys/device.h>
-#include <sys/workq.h>
+#include <sys/task.h>
#include <machine/bus.h>
#include <machine/intr.h>