Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2012 21:49:02 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230626 - head/sys/dev/pccbb
Message-ID:  <201201272149.q0RLn2U3061917@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201272149.q0RLn2U3061917>