aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-05-24 17:26:16 +0000
committerWarner Losh <imp@FreeBSD.org>2006-05-24 17:26:16 +0000
commit2f6303b0f68f50b85e6445b06c9e76881bbff213 (patch)
treec79b323c5076d2ff9862a207dfaa10aa66a88301
parent1b2ec08c94b3d09c95e11a877daf1965557ae40f (diff)
Suspend the children before we turn off card events in hardware. This
was done, I believe, to work around some cards having issues in the suspend case. I think that this helped my Sony VAIO TS505 work better when it had certain wireless cards in it and I did a apm -z. I've not tested suspend/resume on other laptops in a long time, so I hope this doesn't cause greif. Please let me know if it does.
Notes
svn path=/head/; revision=158892
-rw-r--r--sys/dev/pccbb/pccbb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 387795f0d729..1f7cc2f45101 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -1568,11 +1568,13 @@ cbb_suspend(device_t self)
int error = 0;
struct cbb_softc *sc = device_get_softc(self);
+ error = bus_generic_suspend(self);
+ if (error != 0)
+ return (error);
cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */
bus_teardown_intr(self, sc->irq_res, sc->intrhand);
sc->flags &= ~CBB_CARD_OK; /* Card is bogus now */
- error = bus_generic_suspend(self);
- return (error);
+ return (0);
}
int