Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Matthew Jacob <mjacob@netbsd.org>
List: source-changes
Date: 05/26/2001 00:45:56
Module Name: syssrc
Committed By: mjacob
Date: Fri May 25 21:45:56 UTC 2001
Modified Files:
syssrc/sys/dev/ic: isp.c isp_netbsd.c isp_netbsd.h
Log Message:
Create a kernel thread for Fibre Channel cards. This is the new
way of doing business- modulo some startup spasms and peculiarities
of the way kthreads are started (*after* configuration, weird) and
some strangeness with the freeze/thaw code, what now happens is
that any of Loop Down, LIP, Loop Reset or Port Datbase or Name
Server Database Changed ASYNC events cause the queues to freeze
for this channel. The arrival of a Loop UP is not relevant.
What *is* relevant is that the Port Datbase or Name Server Changed
async event indicate that it's okay to go and (re)evaluate the
state of the FC link and (re)probe local loop and fabric membership.
We have a kthread do this because it's *sooooo* much nicer to be
able to sleep while doing the 130-250 mailbox commands it'll take
to re-evaluate things.
When the state is well known again, we can unfreeze the channel
queues. Then, as commands start arriving, we simply can start them
or bounce them with XS_SELTIMEOUT (if the device in question has
gone away). Previously, we did lazy evaluation, which meant that
if a change occurred, we would wait until the very *next* command
to go rebuild stuff.
The reason this is not sensible is:
a) Even with sleeping, you can hang up your system because you might be
making some poor stat(2) call pay the price of re-evaluating the whole
fabric.
b) If we ever really want to get to dynamic attachment/detachment, we
should find out sooner, rather than later, where things get to.
Split off ispminphys_1020 from ispminphys- a 1020 has a 24 bit limit-
not anything newer.
Re-enable LIPs and Loop Resets as async events- this allows the outer
layer to set policy about them.
Roll platform major && minor. Remove bogus waitq (no longer used).
Remove callout entry in softc (no longer used). Define some shorthands
for channels. Clean up a variety of cruft left over from the
thorpej_scsipi changeover.
To generate a diff of this commit:
cvs rdiff -r1.76 -r1.77 syssrc/sys/dev/ic/isp.c
cvs rdiff -r1.43 -r1.44 syssrc/sys/dev/ic/isp_netbsd.c
cvs rdiff -r1.42 -r1.43 syssrc/sys/dev/ic/isp_netbsd.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.