Subject: splbio() difficulties
To: None <tech-kern@NetBSD.ORG>
From: None <>
List: tech-kern
Date: 10/27/1996 07:38:19
I'm trying to get the mac68k to boot with an ncr53c96 using
a customized esp driver.  It's getting hung up trying to mount
root because it's getting SCSI transactions w/o SCSI_POLL, but
where the kernel is basically polling (
	s = splbio();
	while (!done)
where "done" is waiting for xs->flags &ITS_DONE or the equivalent for
the buf in biowait()).  splbio blocks the disk interrupts and since
SCSI_POLL wasn't specified, it is in a state where it needs an
interrupt to continue.  Since the mac doesn't have DMA (except in a few
models (IIfx, Quadra/Centris 660AV & Quadra 840AV)), it gets an
interrupt for every byte as well as every driver transition.

As someone pointed out to me, the sleep/tsleep will normally cause
someone else to be scheduled.  In mountroot(), though, there is just
proc0 so nothing else will ever get scheduled, and the processor stays
at splbio, preventing me from getting the required interrupt.  Can't we
still end up with all processes waiting on I/O, so all are running at
splbio and the driver is still waiting on an interrupt which it can't

I must still be being dense...  I don't see how the sparc port works
right now--or, I presume, the Alpha--unless splbio does not block the
esp interrupts.  The driver code, though, does assume that splbio()
blocks interrupts, so that can't be it.  I'd appreciate it if someone
could help me deconfuse myself...  ;-)


              Allen Briggs - end killing -