Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/isp_netbsd.c
RevisionDateAuthorComments
 1.99  09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.98  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.97  24-Apr-2021  thorpej branches: 1.97.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.96  05-Dec-2020  thorpej branches: 1.96.2;
Remove unnecessary inclusion of <sys/timevar.h>.
 1.95  25-Sep-2019  maya branches: 1.95.8;
Make clang -Wformat-security happier by not passing a (constant) variable
as the format string,
const string msg; printf(msg)
-> printf("%s", msg);

the strings are all known and don't currently contain format variables.
 1.94  21-Sep-2019  maxv Remove unused function prototype. Reported by the lgtm bot.
 1.93  20-Sep-2019  christos declare printflike functions and fix another printf format.
also change 0x%x -> %#x.
 1.92  20-Sep-2019  maxv Fix argument.

Found by the lgtm bot.
 1.91  03-Feb-2019  mrg - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
 1.90  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.89  28-Jul-2017  riastradh branches: 1.89.2; 1.89.4;
Reject out-of-bounds channel index.

From Ilja Van Sprundel.
 1.88  31-Dec-2014  christos branches: 1.88.10;
We can't sleep if we are called from the watchdog timeout.
 1.87  18-Oct-2014  snj branches: 1.87.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.86  21-Aug-2012  bouyer branches: 1.86.2; 1.86.14; 1.86.16; 1.86.20;
Properly fill the struct timeval before using it: a timeout in microseconds has
to be converted to seconds and microseconds.
Fix KASSERT("usec >= 0 && usec < 1000000") in tvtohz().
While there, simplify computation of to (avoids a timersub() in tvhzto()
and directly call tvtohz() with the interval).
 1.85  12-Dec-2011  jdc branches: 1.85.2; 1.85.4;
Fix:
panic: kernel diagnostic assertion "usec >= 0 && usec < 1000000" failed: file "/usr/src/sys/kern/subr_time.c", line 92
by using timeradd(), rather than our own code, in the timeout calculating
loop. Idea from joerg@.
 1.84  20-Sep-2010  mjacob branches: 1.84.8; 1.84.12;
Multiple channel devices *should* be working. Remove the debug code
that was avoiding finding out.
 1.83  26-Mar-2010  mjacob Synchronize with other platforms:

Strongly architect handles so we can more easily detect bogus
handles. This switches us to a full 32 bits for all handles.

Handle the case of FC disks disappearing and then reappearing-
at least at the FC transport level.

Some better and finer control of debug and non-debug printouts.
 1.82  11-Jan-2010  mjacob branches: 1.82.2; 1.82.4;
Keep track of what appear to be live Fibre Channel disks and store up the
Port WWNs for them as well as attaching them as a "port-wwn" property to
the device node in question. This allows MD code to find the boot device
on some platforms.

This is less clean than it should be. A better solution would be to make
some changes to the scsi infrastructure so that periphs can query and
use and store their own "native" transport addresses. However, that's
a much more invasive change and it is not clear how many ports or devices
really want or need that information (yet).
 1.81  07-Sep-2009  tsutsui Split device_t/softc.
Tested QLogic 1020 Fast Wide SCSI HBA at PCI.
Sbus attachment is untested, but not so much quirks in it.
 1.80  25-Jun-2009  mjacob Update ISP driver to latest and greatest. Includes support for the 8Gb part.
 1.79  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.78  15-Jul-2008  christos branches: 1.78.8;
Use more timespecs internally. From Alexander Shishkin and me.
Welcome to 4.99.70, 30 more to go for 100.
 1.77  08-Apr-2008  cegger branches: 1.77.4; 1.77.6; 1.77.8; 1.77.10;
use aprint_*_dev and device_xname
 1.76  11-Mar-2008  mjacob Checkpoint of some fairly major isp(4) rototilling.

Reintroduce more of a 'channel' concept in preparation for NP-IV support.
This gets rid of the chanA/chanB concept as the 2400 can have up to 128
virtual channels. Actually, with MID firmware you can also have the 2200
and 2300 support 'channels, but they do it with an FL-Port topology.
Because FC cards can now have 'channels', just about every support
function for fibre channel had to be redone to have a channel index
as well. Rototill isp_ioctl.h for channel stuff as well.

Pick up a lot of work about fabric management (hopefully better) and keep
work in place that will allow for dynamic attachment/detachment of devices
(if I can figure out how to make the midlayer support it).

Merge the target code with external trees. Eventually it might even
be sorted out on NetBSD.

Update some firmware stuff.
 1.75  09-Jul-2007  ad branches: 1.75.8; 1.75.24; 1.75.28;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.74  24-May-2007  mjacob Major update to isp(4) driver to bring it in line with external sources.

The major changes are:

+ 4Gb (24XX) card support
+ Rewritten fabric and loop evaluation code
+ New f/w sets

The 4Gb changes required major rototilling, which caused a rewrite of
fabric and loop eval code. The latter can now be set up to tune for
dynamic device arrival/departure if the framework is set up for it,
or to be firm about waiting for devices.

Testing has been principally on amd64, i386 and sparc64 and seems to
not have broken things for me.
 1.73  04-Mar-2007  christos branches: 1.73.2; 1.73.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.72  13-Jan-2007  cube branches: 1.72.2;
Make it compile with all the options.
 1.71  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.70  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.69  30-Aug-2006  christos branches: 1.69.2; 1.69.4;
fix initializers.
 1.68  07-May-2006  jdc Remove call that sets XS_STS_DONE before we call scsipi_done().
This makes isp work again following the change in r1.135 of scsipi_base.c.
Also tested by David Hopper.
 1.67  11-Dec-2005  christos branches: 1.67.4; 1.67.6; 1.67.8; 1.67.10; 1.67.12;
merge ktrace-lwp.
 1.66  30-May-2005  christos branches: 1.66.2;
- add missing const
- fix variable shadowing
- remove unneeded casts
 1.65  27-Feb-2005  perry nuke trailing whitespace
 1.64  04-Dec-2003  keihan branches: 1.64.8; 1.64.10;
netbsd.org -> NetBSD.org

This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean". Thanks for the patiance, and sorry for all the commits.
 1.63  02-Nov-2003  wiz Fix some typos. From Tom Cosgrove via jmc@openbsd.
 1.62  08-Oct-2003  pk In isp_fc_worker() reduce the timeout value used to poll for the link
status from 10 seconds to 250 milli seconds for the second and subsequent
attempts to determine the link status. This prevents unnecessary long
stalls after the device attach routines have completed.

Tested on a dual port QLogic 3212. Approved by mjacob@feral.com.
 1.61  27-Sep-2003  tls Remove NOSETTLE flag from channel in FibreChannel case. It makes sense that
it should be there, but in practice, on some systems an ugly race condition
rears its head: SCSI commands are issued before the FC thread ever runs, and
fail from then on forever. Yuck.
 1.60  07-Aug-2003  mjacob Note both active and nvram WWNN/WWPNs

Fix the bug where the thread worker constantly looped. It was a race as
to whether or not the thread fired up or a polled/probed command happened
first, or maybe it's due to other scsipi changes, but we never set the
value that caused the fc thread worker to actually go to sleep until an
initial loop up.

This was rather ugly as it consumed nearly all CPU time available from thence
on. Bad.
 1.59  21-Mar-2003  mjacob branches: 1.59.2;
Fibre Channel doesn't need bus reset settle time.
 1.58  25-Nov-2002  thorpej Avoid strict-alias warnings.
 1.57  01-Sep-2002  mjacob Do not enable interrupt driven mailbox commands for non-FC scsi.
 1.56  12-Aug-2002  mjacob Various changes to allow for overriding just loopid and/or iid.
Fix a random 23XX ISR reading bug. Be chattier about HBA_BOTCH
errors. More f/w cashdump layering.
 1.55  15-Jun-2002  mjacob Add support for ISP_FC_GETHINFO which can tell you connection topology,
current speed, loopid, etc.
 1.54  08-Jun-2002  yamt make auto const variables static.
 1.53  04-Apr-2002  mjacob branches: 1.53.2; 1.53.4;
Redo fabric evaluation to not use GET ALL NEXT (GA_NXT). Switches seem
to be trying to wriggle out of supporting this well. Instead, use
GID_FT to get a list of Port IDs and then use GPN_ID/GNN_ID to find the
port and node wwn. This should make working on fabrics a bit cleaner and
more stable.

This also caused some cleanup of SNS subcommand canonicalization so that
we can actually check for FS_ACC and FS_RJT, and if we get an FS_RJT,
print out the reason and explanation codes.

We'll keep the old GA_NXT method around if people want to uncomment a
controlling definition in ispvar.h.

This also had us clean up ISPASYNC_FABRICDEV to use a local lportdb argument
and to have the caller explicitly say that a device is at the end of the
fabric list.
 1.52  21-Feb-2002  mjacob Implement F/W crashdumps for 2200 && 2300 cards (kernel compile option).

Distinguish between 2312 and 2300 cards (they *are* different). Enable
RIO (Reduced Interrupt Operation) for the LVD cards (hey- I've seen
batched completions of the 30 commands at a time with this,....)...

If we get a Port Logout on local loop topologies, we have to force the
f/w to log back in. The easiest way (for us) to do this is to force
a LIP. This also will wake up the disk that probably just had a f/w crash.

Implement mailbox 'continuations'- this allows interrupts to re-drive
a mailbox command if it's one that just essentially repeats the previous
mailbox command (e.g., f/w download). This saves a boatload of sleep/wakeup
twitches.

If we're not a 2300 and we're about to return with a 'bogus interrupt'- check
the semaphore register to be non-zero at all and outgoing mailbox 0- this
seems to be where some of the lost ISP1080 commands came from.
 1.51  14-Dec-2001  mjacob Major restructuring for swizzling to the request queue and unswizzling from
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have
a complete set of inline functions in isp_inline.h. Each platform is
responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32}
macros.

The reason this needs to be done is that we need to have a single set of
functions that will work correctly on multiple architectures for both little
and big endian machines. It also needs to work correctly in the case that
we have the request or response queues in memory that has to be treated
specially (e.g., have ddi_dma_sync called on it for Solaris after we update
it or before we read from it).

One thing that falls out of this is that we no longer build requests in the
request queue itself. Instead, we build the request locally (e.g., on the
stack) and then as part of the swizzling operation, copy it to the request
queue entry we've allocated. I thought long and hard about whether this was
too expensive a change to make as it in a lot of cases requires an extra
copy. On balance, the flexbility is worth it. With any luck, the entry that
we build locally stays in a processor writeback cache (after all, it's only
64 bytes) so that the cost of actually flushing it to the memory area that is
the shared queue with the PCI device is not all that expensive. We may examine
this again and try to get clever in the future to try and avoid copies.

Another change that falls out of this is that MEMORYBARRIER should be taken
a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the
entry being added. But there had been many other places this had been missing.
It's now very important that it be done.

For NetBSD, it does a ddi_dmamap_sync as appropriate. This gets us out of
the explicit ddi_dmamap_sync on the whole response queue that we did for SBus
cards at each interrupt.

Set things up so that platforms that cannot have an SBus don't get a lot of
the SBus code checks (dead coded out).

Additional changes:

Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry,
the iptr value that gets returned is the value we intend to eventually plug
into the ISP registers as the entry *one past* the last one we've written-
*not* the current entry we're updating. All along we've been calling sync
functions on the wrong index value. Argh. The 'fix' here is to rename all
'iptr' variables as 'nxti' to remember that this is the 'next' pointer-
not the current pointer.

Devote a single bit to mboxbsy- and set aside bits for output mbox registers
that we need to pick up- we can have at least one command which does not
have any defined output registers (MBOX_EXECUTE_FIRMWARE).

Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response.
Otherwise, we won't unswizzle it correctly.

Nuke some additional __P macros.
 1.50  13-Nov-2001  lukem add/cleanup RCSID
 1.49  28-Sep-2001  mjacob Now that we have a fixed thaw thingie- we can turn back on sleeping
on mailbox commands.
 1.48  05-Sep-2001  mjacob branches: 1.48.2;
Fix a misspelled error message.

Temp work around problems where if we allow for non-polled mailbox commands
we got nailed by hardclock calling is for a timed thaw. Basically, this
means we only enable non-polled mailbox commands in the FC kthread when it
calls isp_fc_runstate.
 1.47  01-Sep-2001  mjacob Add support for 2 Gigabit cards (2300/2312). This necessitated a change
in how interrupts are down- the 23XX has not only a different place to check
for an interrupt, but unlike all other QLogic cards, you have to read the
status as a 32 bit word- not 16 bit words. Rather than have device specific
functions as called from the core module (in isp_intr), it makes more sense
to have the platform/bus modules do the gruntwork of splitting out the
isr, semaphore register and the first outgoing mailbox register (if needed)
*prior* to calling isp_intr (if calling isp_intr is necessary at all).
 1.46  07-Jul-2001  mjacob branches: 1.46.2;
If I've told myself once, I've told myself 1000 times- *NEVER* commit
w/o test compiling first. Argh. I nuked one extra line that I shouldn't
have.
 1.45  06-Jul-2001  mjacob Defer turning off the no_mbox_ints flag until after the system is ready
for interrupts. Handle FW crashes in outer layer.
 1.44  25-May-2001  mjacob 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.
 1.43  16-May-2001  mjacob It's 'role None', not 'role No'.

Also, pay attention to the difference in the ISPASYNC_CHANGE_NOTIFY
between loop and fabric changes.
 1.42  25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.41  10-Apr-2001  mjacob Add initial implementation of ISP_SDBLEV, ISP_RESETHBA, ISP_FC_RESCAN,
ISP_FC_LIP and ISP_FC_GETDINFO ioctls.
 1.40  14-Mar-2001  mjacob Handles are now 16 bits. ANSIfy.
 1.39  12-Feb-2001  mjacob branches: 1.39.2;
Do some cleanup based upon adapter role- mainly not enabling interrupts
if we're ISP_ROLE_NONE. Change ISPASYNC_LOGGED_INOUT to ISPASYNC_PROMENADE.
Make sure we note if something is a fabric device.
 1.38  09-Jan-2001  mjacob ISPASYNC_PDB_CHANGED->ISPASYNC_LOGGED_INOUT. And also, ISPASYNC_CHANGE_NOTIFY
is for both local loop and fabric cases now.
 1.37  28-Dec-2000  mjacob Apply nearly all of Bill Sommerfeld's -Wformat patches. The one
change I didn't take is the %llu format- I can't have a common
across multiple platform module assume a %ll argument capability-
which really pointed out that I shouldn't be trying to *print*
something which could long long.
 1.36  28-Dec-2000  mjacob Turn ISP_LOCK/ISP_UNLOCK into ISP_ILOCK/ISP_IUNLOCK macros for routines
that are driven from a timeout (oops, they're on the interrupt stack).
 1.35  28-Dec-2000  mjacob Restore the change fvdl made. Sorry about not noticing it. The
header (about 'Maintainer') is supposed to help encourage folks
to coordinate with me.
 1.34  23-Dec-2000  wiz Fix pathnames in comment.
 1.33  09-Dec-2000  mjacob Finally fix this driver to be sensible about the ENDIAN dance. It's not
quite simply a question of the Qlogic being little endian and having
to have stuff swapped on big endian machines- it also has to do with the
fact that the SBus and PCI DMA layouts are wierd with respect to this.

At any rate, now finally fixed- works on Mac G4, tested it on a SS10
for sparc, checked on alpha to see if I've broken anything, and as
soon as I get another spare afternoon I'll finally install a sparc64
version which should just work (as it'll be like the Mac).
 1.32  04-Dec-2000  fvdl Remove uninitialized variable usage (it was redundant anyway).
 1.31  16-Oct-2000  mjacob Add in commented-out hiwater measurement.

Remove egregious older bug which had us refusing to log into
fabric devices unless they were NL ports. Whuff.
 1.30  14-Aug-2000  mjacob Add a maintenance note. Change all splbio's to use the ISP_LOCK/ISP_UNLOCK
or ISP_ILOCK/ISP_IUNLOCK macros.
 1.29  08-Aug-2000  mjacob Remove ispcmd_slow routine- SCBUSACCEL routine will set/clear tag/wide/sync.
Make some changes about where some things sit in the softc.
 1.28  01-Aug-2000  mjacob Core version 2.0 (platform version 1.0) rewrite of ISP driver. Some
interace cleanups, some new common functions. The major impact that
will be noticeable right away is that if you boot with not Fibre connected
to the FC cards, you no longer hang indefinitely.
 1.27  07-Jul-2000  mjacob Gah. Bad port from FreeBSD code (thanks Robert Elz) for setting
up default timeout for watchdogging commands.
 1.26  05-Jul-2000  mjacob Redo watchdogs to handle cases of false death of commands- time
each command now.. Get rid of SCCLUn stuff. Use an isp_done routine
to handle cases of watchdog and isp_done racing to completion.
 1.25  13-May-2000  he branches: 1.25.4;
Update from Matthew Jacob:

Correctly account for F-port vs. F-port (no FLOGI_ACC) topologies.
Make sure we get a port database entry for the fabric name server.
Preserve fabric logins if the device didn't change across fabric
or port database changes, or the device has already logged into
us (e.g., for target/initiator dual role devices like Veritas
SANbox). Propagate class 3 service parameter changes where devices
can change roles.

Fix all occurrences of setting a sendmarker so that setting it
for one bus on dual bus cards doesn't wipe a pending sendmarker
for other busses on the same card :-;.

Comments added and clarifications made in some of the target mode code.
 1.24  23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.23  12-Feb-2000  mjacob add 80 MHz case
 1.22  20-Dec-1999  mjacob clean unused fwrev stuff
 1.21  16-Dec-1999  mjacob Dual LVD (1280) support.
 1.20  05-Dec-1999  mjacob Oops. The compiler didn't catch this 'used before set'. Kudos
to Sean Doran for finding it and being nice in telling me.
 1.19  04-Dec-1999  mjacob (wow- I thought I'd already committed most of this).

Clean up some isp_attach time stuff- if ISP2100_FABRIC is defined try *really*
hard to make sure that we get the firmware state to FW_READY and see the
loop state where the Port Database is ready to be gathered- if we don't do
this it's unlikely we will be able to correctly query the nameserver because
we won't see that we're on a fabric.

Clean up the completely broken and stupid attempts to hot switch the
'slow' start routine out of the way. Sigh.

Turn speed announcements into CFGPRINTF functions (available only if DEBUG
defined).
 1.18  17-Oct-1999  mjacob branches: 1.18.2;
some comments added
 1.17  14-Oct-1999  mjacob Add in an ioctl entry point so scsictl mediated bus resets will work.
Redo how we start commands- do a 'slow' start function which then
looks to see when we're done the configuration process at which point
it *then* enables sync/wide mode. Set the max openings amount to the
true max openings- not a synthetic. Add a timeout driven command requeue
function so that Loop Down events well freeze things until a later point
in time where they might be restarted.
 1.16  30-Sep-1999  thorpej branches: 1.16.2;
Update for SCSIPI changes. Note that capabilities update is disabled
until Matt Jacob has a change to update the driver for the latest
firmware, etc. since update device parameters seems to fail once the
system is really up and running, and eventually causes the controller
to wedge. This may be due to a firmware bug.

Per discussion with Matt.
 1.15  05-Jul-1999  mjacob Change to approved NASA/Ames copyright. Add Fabric support. Fix SCCLUN support.
Add code that tries to track LoopID shifting.
 1.14  12-May-1999  mjacob Do a fairly large internal restructuring to accomodate dual-bus host adapters
(e.g., the 1240). Include the new 1080/1240 NVRAM layout reading code. Some
moderately significant mailbox changes were necessary also to accomodate a
second channel.
 1.13  04-Apr-1999  mjacob firmware revision now a triple
 1.12  26-Mar-1999  mjacob branches: 1.12.2; 1.12.4;
add isp1080 support and some basic PDB change stuff
 1.11  17-Mar-1999  mjacob Update the driver with some infrastructure for the 1080. Fix an embarrassing
clock botch bug. Additional infrastructure for PDB change stuff.
 1.10  09-Feb-1999  mjacob Do SCSI Bus resets in this layer (now). Don't do it for Fibre Channel yet
(we get LOOP DOWN events, and we'll hang on that at this time).

Add other isp_async cases- ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP. DOWN
will cause internal queuing until UP, whereupon a timeout will fire up
any pending xfers. It doesn't really keep commands from getting destroyed
by loop down events, but at least minimizes the damage. This was much
easier to implement with CAM.
 1.9  30-Jan-1999  mjacob Implement and use Fast Posting for both parallel && fibre. Redo a bit of
the startup code. Implement a call to outer framework function so that
asynchronous events can be handled (e.g., speed negotiation, target mode).

Roll internal release tags.
 1.8  28-Dec-1998  mjacob clean up headers; move uninit/watch to outer layers
 1.7  05-Dec-1998  mjacob Update BA for new max_lun parameter for SCSIbusses. Clearify maximum luns
for FC HB based upon a SCCLUN define (15 for normal- 255 out of a possible
65535 for SCCLUN). Propagate loopid as adapter_target.

Roll minor platform version. Roll core version number.

Update mailbox definitions with cleaner target mode structure definitions.
Clean up some ENDIAN stuff. Correct botched ISP2100_NVRAM_HARDLOOPID offset.
 1.6  19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.5  10-Oct-1998  thorpej branches: 1.5.2;
Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.4  17-Sep-1998  mjacob cleanup header to be just NetBSD
 1.3  08-Sep-1998  mjacob add case for going from probetime to runtime speeds
 1.2  18-Jul-1998  mjacob fix bogus comments
 1.1  15-Jul-1998  mjacob NetBSD OS specific routines and definitions.
 1.5.2.2  07-Nov-1998  cgd pull up revs 1.1-1.5 from trunk (new file), and patch so that it works
in 1.3.x. (mjacob)
 1.5.2.1  10-Oct-1998  cgd file isp_netbsd.c was added on branch netbsd-1-3 on 1998-11-07 05:50:35 +0000
 1.12.4.2  02-Aug-1999  thorpej Update from trunk.
 1.12.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.12.2.2  13-May-2000  he Apply patch (requested by Matthew Jacob via he):
Correctly account for F-port vs. F-port (no FLOGI_ACC) topologies.
Make sure we get a port database entry for the fabric name server.
Preserve fabric logins if the device didn't change across fabric
or port database changes, or the device has already logged into
us (e.g., for target/initiator dual role devices like Veritas
SANbox). Propagate class 3 service parameter changes where devices
can change roles.

Fix all occurrences of setting a sendmarker so that setting it
for one bus on dual bus cards doesn't wipe a pending sendmarker
for other busses on the same card.

Comments added and clarifications made in some of the target mode code.

Add support for > 12 byte CDBs. Split out nvram reading into
per-card functions. Add proper Ultra2/Ultra3 support. Upgrade
firmware.
 1.12.2.1  08-Jan-2000  he Pull up revisions 1.13-1.15,1.17-1.22 (via patch, requested by mjacob):
Untangle Qlogic firmware copyright problems and update firmware.
Untangle some MD support issues for said firmware. Add 1280 (Dual
LVD), 1240 (Dual Ultra), 2200 (2nd Generation Qlogic FC chipset).
Fix some synchronous negotiation problems for parallel SCSI.
Firm up some Fabric Support issues.
 1.16.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.16  23-Apr-2001  mjacob Do some minor clenaups with respect to adapter and channel openings.
There's no need to set channel openings if you don't set a flag that
says to look at them.

Make sure that the adapt_max_periph value is, for now, less than the
possible SPI-2 tag count. We really need a flag that says "don't do
tags for me as the adatper generates its own". Set channel ID for
FC to MAX_FC_TARG (i.e., get it out of the way entirely).
 1.18.2.15  21-Apr-2001  bouyer Sync with HEAD
 1.18.2.14  06-Apr-2001  bouyer Hum, don't set max number of request per periph larger than 256.
 1.18.2.13  27-Mar-2001  bouyer Sync with HEAD.
 1.18.2.12  27-Mar-2001  bouyer Convert these drivers to thorpej_scsipi (untested).
 1.18.2.11  12-Mar-2001  bouyer Sync with HEAD.
 1.18.2.10  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.18.2.9  05-Jan-2001  bouyer Sync with HEAD
 1.18.2.8  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.18.2.7  08-Dec-2000  bouyer Sync with HEAD.
 1.18.2.6  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.18.2.5  26-Oct-1999  thorpej Update for:

Deal a little more gracefully with the fact that xfer mode parameters
are for the I_T Nexus, and make all xfer mode updates `async events'.
 1.18.2.4  20-Oct-1999  thorpej - Eliminate sleeping from adapter routines.
- On a LOOP DOWN event, freeze the channel queue.
- On a LOOP UP event, do a timed thaw on the channel queue.
 1.18.2.3  19-Oct-1999  thorpej Use the ASYNC_EVENT_XFER_MODE callback.
 1.18.2.2  19-Oct-1999  thorpej Ooops, forgot to initialize a variable.
 1.18.2.1  19-Oct-1999  thorpej Adapt to scsipi API changes.
 1.25.4.3  16-Mar-2001  he Pull up revisions 1.36-1.40 (requested by mjacob):
Do some cleanup based upon adapter role - mainly not enabling
interrupts if we're ISP_ROLE_NONE. ISPASYNC_LOGGED_INOUT ->
ISPASYNC_PROMENADE. Make sure we note if something is a fabric
device. ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT. Add
-Wformat patches. Handles are 16 bits.
 1.25.4.2  25-Jan-2001  jhawk Pull up revisions 1.31-1.35 (requested by mjacob):
Add in correct SBus bursting; upgrade to 2.01.26 firmware; pull to latest
initiator mode level; make changes to WWN default handling; quiet
chatty boot messages; fix endian code so MacPPC works; fix bug in
lock recursion counter; fix bug which excluded all but NL-ports from
being logged into on a fabric.
 1.25.4.1  28-Aug-2000  mjacob Complete rewrite of internals for isp core version 2.0.
Pullup to netbsd-1-5 approved by thorpej@netbsd.org.
 1.39.2.13  11-Dec-2002  thorpej Sync with HEAD.
 1.39.2.12  17-Sep-2002  nathanw Catch up to -current.
 1.39.2.11  13-Aug-2002  nathanw Catch up to -current.
 1.39.2.10  20-Jun-2002  nathanw Catch up to -current.
 1.39.2.9  17-Apr-2002  nathanw Catch up to -current.
 1.39.2.8  28-Feb-2002  nathanw Catch up to -current.
 1.39.2.7  08-Jan-2002  nathanw Catch up to -current.
 1.39.2.6  14-Nov-2001  nathanw Catch up to -current.
 1.39.2.5  08-Oct-2001  nathanw Catch up to -current.
 1.39.2.4  21-Sep-2001  nathanw Catch up to -current.
 1.39.2.3  24-Aug-2001  nathanw Catch up with -current.
 1.39.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.39.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.46.2.5  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.46.2.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.46.2.3  16-Mar-2002  jdolecek Catch up with -current.
 1.46.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.46.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.48.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.53.4.1  01-Sep-2002  lukem Pull up revision 1.57 (requested by lukem for mjacob in ticket #757):
Do not enable interrupt driven mailbox commands for non-FC scsi.
 1.53.2.2  29-Aug-2002  gehenna catch up with -current.
 1.53.2.1  20-Jun-2002  gehenna catch up with -current.
 1.59.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.59.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.59.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.59.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.59.2.1  03-Aug-2004  skrll Sync with HEAD
 1.64.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.64.8.1  29-Apr-2005  kent sync with -current
 1.66.2.5  17-Mar-2008  yamt sync with head.
 1.66.2.4  03-Sep-2007  yamt sync with head.
 1.66.2.3  26-Feb-2007  yamt sync with head.
 1.66.2.2  30-Dec-2006  yamt sync with head.
 1.66.2.1  21-Jun-2006  yamt sync with head.
 1.67.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.67.10.1  11-May-2006  elad sync with head
 1.67.8.2  03-Sep-2006  yamt sync with head.
 1.67.8.1  24-May-2006  yamt sync with head.
 1.67.6.1  01-Jun-2006  kardel Sync with head.
 1.67.4.1  09-Sep-2006  rpaulo sync with head
 1.69.4.2  10-Dec-2006  yamt sync with head.
 1.69.4.1  22-Oct-2006  yamt sync with head
 1.69.2.2  01-Feb-2007  ad Sync with head.
 1.69.2.1  18-Nov-2006  ad Sync with head.
 1.72.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.73.4.1  11-Jul-2007  mjf Sync with head.
 1.73.2.7  15-Jul-2007  ad Sync with head.
 1.73.2.6  01-Jul-2007  ad Adapt to callout API change.
 1.73.2.5  09-Jun-2007  ad Sync with head.
 1.73.2.4  27-May-2007  ad Sync with head.
 1.73.2.3  13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.73.2.2  10-Apr-2007  ad Nuke the deferred kthread creation stuff, as it's no longer needed.
Pointed out by thorpej@.
 1.73.2.1  09-Apr-2007  ad - Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.
 1.75.28.3  28-Sep-2008  mjf Sync with HEAD.
 1.75.28.2  02-Jun-2008  mjf Sync with HEAD.
 1.75.28.1  03-Apr-2008  mjf Sync with HEAD.
 1.75.24.1  24-Mar-2008  keiichi sync with head.
 1.75.8.1  23-Mar-2008  matt sync with HEAD
 1.77.10.1  19-Oct-2008  haad Sync with HEAD.
 1.77.8.1  18-Jul-2008  simonb Sync with head.
 1.77.6.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.77.4.7  09-Oct-2010  yamt sync with head
 1.77.4.6  11-Aug-2010  yamt sync with head.
 1.77.4.5  11-Mar-2010  yamt sync with head
 1.77.4.4  16-Sep-2009  yamt sync with head
 1.77.4.3  18-Jul-2009  yamt sync with head.
 1.77.4.2  16-May-2009  yamt sync with head
 1.77.4.1  04-May-2009  yamt sync with head.
 1.78.8.2  23-Jul-2009  jym Sync with HEAD.
 1.78.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.82.4.2  05-Mar-2011  rmind sync with head
 1.82.4.1  30-May-2010  rmind sync with head
 1.82.2.2  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.82.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.84.12.1  18-Feb-2012  mrg merge to -current.
 1.84.8.2  30-Oct-2012  yamt sync with head
 1.84.8.1  17-Apr-2012  yamt sync with head
 1.85.4.1  01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.85.2.2  19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1485):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.85.2.1  03-Sep-2012  riz branches: 1.85.2.1.2; 1.85.2.1.4;
Pull up following revision(s) (requested by bouyer in ticket #524):
sys/dev/ic/isp_netbsd.c: revision 1.86
Properly fill the struct timeval before using it: a timeout in microseconds has
to be converted to seconds and microseconds.
Fix KASSERT("usec >= 0 && usec < 1000000") in tvtohz().
While there, simplify computation of to (avoids a timersub() in tvhzto()
and directly call tvtohz() with the interval).
 1.85.2.1.4.1  19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1485):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.85.2.1.2.1  19-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1485):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.86.20.1  12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1482):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.86.16.1  12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1482):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.86.14.1  12-Aug-2017  snj Pull up following revision(s) (requested by mrg in ticket #1482):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.86.2.1  03-Dec-2017  jdolecek update from HEAD
 1.87.2.2  28-Aug-2017  skrll Sync with HEAD
 1.87.2.1  06-Apr-2015  skrll Sync with HEAD
 1.88.10.1  09-Aug-2017  snj Pull up following revision(s) (requested by spz in ticket #195):
sys/dev/ic/isp_netbsd.c: revision 1.89
Reject out-of-bounds channel index.
From Ilja Van Sprundel.
 1.89.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.89.4.1  10-Jun-2019  christos Sync with HEAD
 1.89.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.95.8.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.96.2.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.97.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed