Subject: Re: cardbus code without busy wait
To: Lennart Augustsson <lennart@augustsson.net>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 01/19/2000 10:08:38
On Wed, 19 Jan 2000 10:45:33 +0100 
 Lennart Augustsson <lennart@augustsson.net> wrote:

 > > Oh, I made a mistake...  I worry about card attaching
 > > sequence at boot time.  At boot time, kernel thread cannot
 > > be used when inserted device is used to boot kernel up.
 > > Which context is used during the boot sequence?
 > 
 > Oh, OK.  Yes, if you want to be able to attach at boot time you need
 > to busy wait.  But that can be hidden away in some wait routine that
 > checks for the `cold' variable.
 > You can also delay attaching until the attach thread is running.  I thought
 > that was what the cardbus code did already?  Unless you give `flag 1' on
 > in the config file.  I stole this idea for the USB code. :)

that presents another problem ... you can't use PCMCIA/CardBus cards for
the root device in that case.

Probably what you could do is use config_interrupts(), at which point tsleep()
can work since the clock is running (you're on proc0's thread context).

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>