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.
This commit is contained in:
Warner Losh 2012-01-27 21:49:02 +00:00
parent 263811f724
commit dbd618bf56
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230626

View file

@ -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) {