svn commit: r230626 - head/sys/dev/pccbb
Warner Losh
imp at FreeBSD.org
Fri Jan 27 21:49:03 UTC 2012
Author: imp
Date: Fri Jan 27 21:49:02 2012
New Revision: 230626
URL: http://svn.freebsd.org/changeset/base/230626
Log:
Some laptops have weak power controllers that cannot tolerate multiple
cards powering up at once. Work around the easy case (multiple cards
inserted on boot) with a short sleep and a long comment. This
improves reliability on those laptops with power hungry cards.
Modified:
head/sys/dev/pccbb/pccbb.c
Modified: head/sys/dev/pccbb/pccbb.c
==============================================================================
--- head/sys/dev/pccbb/pccbb.c Fri Jan 27 21:22:07 2012 (r230625)
+++ head/sys/dev/pccbb/pccbb.c Fri Jan 27 21:49:02 2012 (r230626)
@@ -460,6 +460,13 @@ cbb_event_thread(void *arg)
int err;
int not_a_card = 0;
+ /*
+ * We need to act as a power sequencer on startup. Delay 2s/channel
+ * to ensure the other channels have had a chance to come up. We likely
+ * should add a lock that's shared on a per-slot basis so that only
+ * one power event can happen per slot at a time.
+ */
+ pause("cbbstart", hz * device_get_unit(sc->dev) * 2);
mtx_lock(&sc->mtx);
sc->flags |= CBB_KTHREAD_RUNNING;
while ((sc->flags & CBB_KTHREAD_DONE) == 0) {
More information about the svn-src-all
mailing list