summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-05-24 17:26:16 +0000
committerimp <imp@FreeBSD.org>2006-05-24 17:26:16 +0000
commit1dda0904e8c9e36a1b08f487cd6ff70705d5f6e2 (patch)
treec79b323c5076d2ff9862a207dfaa10aa66a88301 /sys/dev/pccbb
parent0e7d1a9250a0f4df024a7beb83bcf76fbe1aff5a (diff)
downloadFreeBSD-src-1dda0904e8c9e36a1b08f487cd6ff70705d5f6e2.zip
FreeBSD-src-1dda0904e8c9e36a1b08f487cd6ff70705d5f6e2.tar.gz
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.
Diffstat (limited to 'sys/dev/pccbb')
-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 387795f..1f7cc2f 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
OpenPOWER on IntegriCloud