summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-31 17:13:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-31 17:13:49 +0000
commit9da4ff9be0005fda5ba6d021ccff292caaca62f6 (patch)
treeb3bdf7cd5c66003daeb0f71ac899d004c887677e /sys/dev/pcmcia
parentf4451ac9824b3e8c645bc2be6cfca6659bf11fcc (diff)
Add DVACT_QUIECE support. This is called before splhigh() and before
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r--sys/dev/pcmcia/pcmcia.c15
-rw-r--r--sys/dev/pcmcia/wdc_pcmcia.c5
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c
index 08dc0476296..489144d1880 100644
--- a/sys/dev/pcmcia/pcmcia.c
+++ b/sys/dev/pcmcia/pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia.c,v 1.40 2010/08/30 20:33:18 deraadt Exp $ */
+/* $OpenBSD: pcmcia.c,v 1.41 2010/08/31 17:13:47 deraadt Exp $ */
/* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */
/*
@@ -143,27 +143,28 @@ pcmcia_activate(struct device *self, int act)
case DVACT_ACTIVATE:
/* No children yet */
break;
- case DVACT_DEACTIVATE:
+ case DVACT_QUIESCE:
+ case DVACT_SUSPEND:
+ case DVACT_RESUME:
for (pf = SIMPLEQ_FIRST(&sc->card.pf_head); pf != NULL;
pf = SIMPLEQ_NEXT(pf, pf_list)) {
if (SIMPLEQ_FIRST(&pf->cfe_head) == NULL ||
pf->child == NULL)
continue;
- config_deactivate(pf->child);
+ config_suspend(pf->child, act);
}
break;
- case DVACT_SUSPEND:
- case DVACT_RESUME:
+ case DVACT_DEACTIVATE:
for (pf = SIMPLEQ_FIRST(&sc->card.pf_head); pf != NULL;
pf = SIMPLEQ_NEXT(pf, pf_list)) {
if (SIMPLEQ_FIRST(&pf->cfe_head) == NULL ||
pf->child == NULL)
continue;
- config_suspend(pf->child, act);
+ config_deactivate(pf->child);
}
break;
}
- return 0;
+ return (0);
}
void
diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c
index 97d29d4ed10..b4d10b57bd3 100644
--- a/sys/dev/pcmcia/wdc_pcmcia.c
+++ b/sys/dev/pcmcia/wdc_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc_pcmcia.c,v 1.23 2010/08/30 20:33:18 deraadt Exp $ */
+/* $OpenBSD: wdc_pcmcia.c,v 1.24 2010/08/31 17:13:47 deraadt Exp $ */
/* $NetBSD: wdc_pcmcia.c,v 1.19 1999/02/19 21:49:43 abs Exp $ */
/*-
@@ -442,6 +442,9 @@ wdc_pcmcia_activate(self, act)
}
rv = config_activate_children(self, act);
break;
+ case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
+ break;
case DVACT_SUSPEND:
rv = config_activate_children(self, act);
if (sc->sc_ih)