From 2f6303b0f68f50b85e6445b06c9e76881bbff213 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 24 May 2006 17:26:16 +0000 Subject: [PATCH] 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. --- sys/dev/pccbb/pccbb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 387795f0d72..1f7cc2f4510 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