causes the MI interrupt handler to barf when we get a 5380 RST interrupt
while probing. Worse, the VIA latches the interrupt, so simply having
all interrupts disabled during autoconfig doesn't resolve the problem.
[I demonstrated the latter on a IIci, which erroneously reports a
reselection attempt(!) after autoconfig is complete. The latched
interrupt results from the SCSI bus reset we do when initializing the
bus.]
Since interrupts must be enabled during autoconfig anyway (sigh), test
to see if autoconfig has completed in sbc_irq_intr(). If not, we don't
pass the interrupt up to the MI interrupt handler. Also, make sure to
clear the VIA interrupt if we're servicing an unclaimed 5380 RST
interrupt.
Thanks to Bill Studenmund for providing the key insight needed to unlock
this problem.
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
the pc532/dev/ncr.c-inspired changes; in particular, wait for previous
transfer to complete before starting another, as we used to do. Retain
splbio() protection and simplified sbc_pdma_in().
driver. Major highlights:
- Protect with splbio(), now that interrupts from the chip might be
enabled by default;
- Wait for current transfer to complete before returning, rather than
wait for previous transfer to complete before starting another;
- Instead of logging a "timeout" message when a target disconnects,
just return, letting the sbc_ready() and sbc_wait_not_req() print
timeout messages if such really did occur.
With interrupt changes to sbc_obio.c, disconnect/reselect now works if
configured into the kernel.
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
- When finished writing, if the SCSI bus has BSY asserted, write another
byte to the SBC to ensure we get an interrupt.
- Unflag SCSI interrupts on the VIA whenever we clear the interrupts
on the SBC itself.
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped. I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
a condition that occurs with some slow SCSI devices when they disconnect
(e.g. the AppleCD 600), generating spurious selection interrupts.
- Reorganize the debugging code slightly.