History log of /freebsd-current/sys/dev/isp/isp_library.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# e4d4beba 12-Apr-2022 John Baldwin <jhb@FreeBSD.org>

isp: Remove unused variable.


# 156c1ebe 27-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Some code reorganization.

- Remove code duplication by adding two new functions to execute prepared
queue entry via either mbox or request queue and wait for result.
- Since the new function executing via request queue sleeps any way, make
it sleep also in case of overflows or handle shortages. It should make it
more reliable and less affecting other less flexible request queue users.
- Turn isp_target_put_entry() into not target-specific isp_send_entry().
- Make handling of responses with control handles more universal.
- Move RQSTYPE_RPT_ID_ACQ handling into new function.
- Inline isp_handle_other_response(), becoming trivial after above.
- Clean the list of IOCBs from pre-24xx ones.


# b05f17a1 25-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Some minor FCoE bits I had lying around.


# 8cb0d414 25-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Remove some more dead code from pre-24xx.


# 0f99cb55 23-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Implement request queue overflow protection.

Before this change in case of request queue overflow driver just froze the
device queue for 100ms to retry after. It was pretty bad for performance.
This change introduces SIM queue freezing when free space on the request
queue drops below 255 entries (worst case of maximum I/O size S/G list),
checking for a chance to release it on I/O completion. If the queue still
get overflowed somehow, the old mechanism is still in place, just with
delay reduced to 10ms.

With the earlier queue length increase overflows should not happen often,
but it is still easily reachable on synthetic tests.


# 0b19f90a 21-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Make handlers and atpds overflows unlikely.

- Allocate 256 handlers more than payload commands for management purposes.
- Increase maximum number of handlers from 8K to 16K by tuning the format.
- Just to be safe limit the number of payload commands to 16K - 256.
- Limit number of target exchanges in mixed mode to the number of atpds.
- If we still somehow get out of atpds -- return BUSY, since we really are.


# f6854a0c 20-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Cleanup DMA handling.

- Make isp_start() to set all the IOCB fields aside of S/G list, removing
extra information from isp_send_cmd(), now only doing S/G lists and sending.
- Turn DMA setup/free from being card and PCI-specific into OS-specific,
instead add new card-specific method for isp_send_cmd(). Previously this
function was a monster handling all the cards.
- Remove double error code translation.


# 1b760be4 19-Nov-2020 Alexander Motin <mav@FreeBSD.org>

Remove parallel SCSI and 1/2Gb FC support from isp(4).

This removes 288KB (36%) of the driver code and zillions of hacks and
workarounds, making single driver uniformly support several different
generations of hardware interfaces, not counting minor card variations.
After years of the hopeless fight, I don't think it worth to continue
support for hardware obsolete for 15-20 years. Instead much cleaner
now code should allow to move forward toward better locking, multiple
queues and other cool features.

All the remaining Qlogic cards starting from 4Gb 24xx to 32Gb 27xx use
the same hardware/firmware interface with minor incremental improvements,
so it seems to be a good new starting point. Except one PCI-X model all
all of them are PCIe and so still usable in modern systems.

Discussed with: ken, scottl, jpaetzel, imp
Relnotes: yes


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# a94fab67 03-Jul-2017 Alexander Motin <mav@FreeBSD.org>

Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.

Instead of using GID_FT SNS request to get list of registered FCP ports,
use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID
requests to find whether they are FCP and target capable.

The problem with old approach is that GID_FT does not report ports without
FC-4 type registered. In particular it was impossible to boot OS from
FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4
type even on new cards and so ignored by old code as incompatible.

As a side bonus this allows initiator to skip pointless logins to other
initiators by fetching that information from SNS instead.

In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls
to disable that functionality. I handled broken GFF_ID of my Brocade 200E,
but there may be other switches with different bugs.

Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID
is not supported.

Sponsored by: iXsystems, Inc.


# 7e31684e 24-Mar-2017 Alexander Motin <mav@FreeBSD.org>

Unify initiator and target DMA setup and command sending.

The code is so alike that it is pointless to keep it separate.

MFC after: 2 weeks


# 98b08fbe 18-Mar-2017 Alexander Motin <mav@FreeBSD.org>

Remove dead remnants of SPI target.

MFC after: 2 weeks


# a1fa0267 14-Mar-2017 Alexander Motin <mav@FreeBSD.org>

Improvements around attach, reset and detach.

This change fixes DMA resource leak on driver unload. Also it removes
DMA resources allocation for hardcoded number of requests before fetching
the real number from firmware. Also it prepares ground for more flexible
IRQs allocation according to firmware capabilities.

MFC after: 2 weeks


# 5fa351ed 17-May-2016 Alexander Motin <mav@FreeBSD.org>

Completely remove broken now autologin port flag.

Firmware automatically logs in only to local loop ports, and those ports
can be easily identified without extra flag by zero domain and area IDs.

MFC after: 1 week


# 212fad74 14-Apr-2016 Alexander Motin <mav@FreeBSD.org>

Extract virtual port address from RQSTYPE_RPT_ID_ACQ.

This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.


# 5e3e6a82 11-Apr-2016 Alexander Motin <mav@FreeBSD.org>

Polish debugging IOCB dumping.

Add few more missing cases, unify byte order.

MFC after: 1 month


# 7e53e7ac 09-Apr-2016 Alexander Motin <mav@FreeBSD.org>

Register symbolic port/node names in FC name server.

This is cosmetics that simplifies identification of new ports on FC switch.

It would be good to use target name from CTL here instead of hostname, but
it is not passed here through CAM now.

MFC after: 2 weeks


# 66e979f1 25-Dec-2015 Alexander Motin <mav@FreeBSD.org>

Make virtual ports control asynchronous.

Before this change virtual ports control IOCBs were executed synchronously
via Execute IOCB mailbox command. It required exclusive use of scratch
space of driver and mailbox registers of the hardware. Because of that
shared resources use this code could not really sleep, having to spin for
completion, blocking any other operation.

This change introduces new asynchronous design, sending the IOCBs directly
on request queue and gracefully waiting for their return on response queue.
Returned IOCBs are identified with unified handle space from r292725.


# 970ceb2f 25-Dec-2015 Alexander Motin <mav@FreeBSD.org>

Unify handles allocation for initiator and target IOCBs.

I am not sure why this was split long ago, but I see no reason for it.
At this point this unification just slightly reduces memory usage, but
as next step I plan to reuse shared handle space for other IOCB types.


# a4f43c01 24-Dec-2015 Alexander Motin <mav@FreeBSD.org>

Clear virtual port's port database when disabling it.

Previously it was done only on full chip reinit, that caused old ports
resurrect in case of virtual port reenabling.


# 829dfec0 03-Dec-2015 Alexander Motin <mav@FreeBSD.org>

Update isp_put_icb_2400() for new structure fields.


# e561aa79 26-Nov-2015 Alexander Motin <mav@FreeBSD.org>

One more round of port scanner rewrite.

- Make scan aborted by event restart immediately and infinitely.
- Improve handling of some loop events from firmware.
- Remove loop down timer, adding its functionality to scanner thread.
- Some more unification and simplification.


# a4ccb5d6 23-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.


# 3e6deb33 23-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work. And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.


# 4187a965 21-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests. But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.


# eea52482 19-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Another round of port scanner rewrite.

This change simplifies and unifies port adding/updating for loop and
fabric scanners. It also fixes problems with scanning restarts due to
concurrent port databases changes. It also fixes many cosmetic issues.


# c5fd36ed 18-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Remove some confusions between loopid and nphdl.

Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs. Leave loopid used only where it really
goes about local loop IDs.

While there, fix few more cases where LUNs were still printed in decimal.


# 92056a05 17-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Register our FC4 Features in SNS.


# b6bd5f7f 17-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Unify and cleanup FC ports scan.


# 53c0eee3 17-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Make firmware handle virtual ports SNS logins for us.


# 6d53b0a7 17-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Add real initial support for RQSTYPE_RPT_ID_ACQ.


# b6983e5f 27-Oct-2015 Alexander Motin <mav@FreeBSD.org>

Improve/fix loop scanning routine.

For the most of chips (except anscient ones) port handlers have no relation
to port IDs. In such situation old code scanning first 125 handlers was
quite naive. Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.


# 86a1e16d 26-Oct-2015 Alexander Motin <mav@FreeBSD.org>

Reimplement enable and implement disable of virtual ports.

Now on 24xx and above chips it is really possible to simulate several
virtual FC ports with single physical one. For example, it allows to
configure several targets in ctl.conf, assign each of them to separate
virtual port, and let user to control access to them with switch zoning.

I still doubt that all problems are solved there, but at now it passes
at least basic tests.


# 18c74b22 24-Oct-2015 Alexander Motin <mav@FreeBSD.org>

Add new field to Abort IOCB.


# 92b25384 23-Oct-2015 Alexander Motin <mav@FreeBSD.org>

Minor additions to Status Type 0 IOCB.


# 37a7daac 23-Oct-2015 Alexander Motin <mav@FreeBSD.org>

Improve INOTs handling for 24xx and above chips.


# e68eef14 13-Jul-2015 Alexander Motin <mav@FreeBSD.org>

Unify port database use for target and initiator roles.

Aside from cleaner and more consistent code, this allows ports to be both
target and initiator same time, and easily switch from any role to any.

Sponsored by: iXsystems, Inc.


# 6bef0aa0 04-Jul-2015 Alexander Motin <mav@FreeBSD.org>

Drop discovered targets when initiator role is disabled.


# 30363120 21-Jun-2015 Alexander Motin <mav@FreeBSD.org>

Rewrite port database handling for target mode.

Previous implementation was too fragile to initiator parameters changes.
In case of port role change it could not survive different handle assigned
to the same initiator by firmware, even though initiator was logged out.
The new implementation should be more resillient to this kind of problems,
trying to work in any situation and only warn user about suspisious events.

MFC after: 1 week
Sponsored by: iXsystems, Inc.


# 8592f074 25-Nov-2014 Alexander Motin <mav@FreeBSD.org>

Make isp_find_pdb_by_*() search for targets in portdb in reverse order.

Records with target_mode == 1 are allocated from the end of portdb, so it
seems logical to start search from the end not traverse whole array.

MFC after: 1 month


# bb829be5 11-Oct-2014 Alexander Motin <mav@FreeBSD.org>

Fix r272936 build with old GCC.

MFC after: 1 week


# 829485ba 11-Oct-2014 Alexander Motin <mav@FreeBSD.org>

Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned. Previously that code worked only once, confusing CTL.

MFC after: 1 month


# 718724fd 05-Feb-2014 Alexander Motin <mav@FreeBSD.org>

Fix I/O freezes in some cases, caused by r257916.

Delaying isp_reqodx update, we should be ready to update it every time
we read it. Otherwise requests using several indexes may be requeued
ndefinitely without ever updating the variable.

MFC after: 3 days


# d00fd0a9 10-Nov-2013 Alexander Motin <mav@FreeBSD.org>

Save one more register read per command by not reading rqstoutrp register
every time. The purpose of that register is unlikely output queue overflow
detection, so read it only when its last known (and probably stale now)
value signals overflow.

This reduces CPU load and lock congestion and rises bottleneck in CTL
while doing target mode via two 8Gbps ports from 100K to 120K IOPS.


# 387d8239 28-Jul-2012 Matt Jacob <mjacob@FreeBSD.org>

-----------
MISC CHANGES

Add a new async event- ISP_TARGET_NOTIFY_ACK, that will guarantee
eventual delivery of a NOTIFY ACK. This is tons better than just
ignoring the return from isp_notify_ack and hoping for the best.

Clean up the lower level lun enable code to be a bit more sensible.

Fix a botch in isp_endcmd which was messing up the sense data.

Fix notify ack for SRR to use a sensible error code in the case
of a reject.

Clean up and make clear what kind of firmware we've loaded and
what capabilities it has.
-----------
FULL (252 byte) SENSE DATA

In CTIOs for the ISP, there's only a limimted amount of space
to load SENSE DATA for associated CHECK CONDITIONS (24 or 26
bytes). This makes it difficult to send full SENSE DATA that can
be up to 252 bytes.

Implement MODE 2 responses which have us build the FCP Response
in system memory which the ISP will put onto the wire directly.

On the initiator side, the same problem occurs in that a command
status response only has a limited amount of space for SENSE DATA.
This data is supplemented by status continuation responses that
the ISP pushes onto the response queue after the status response.
We now pull them all together so that full sense data can be
returned to the periph driver.

This is supported on 23XX, 24XX and 25XX cards.

This is also preparation for doing >16 byte CDBs.

-----------
FC TAPE

Implement full FC-TAPE on both initiator and target mode side. This
capability is driven by firmware loaded, board type, board NVRAM
settings, or hint configuration options to enable or disable. This
is supported for 23XX, 24XX and 25XX cards.

On the initiator side, we pretty much just have to generate a command
reference number for each command we send out. This is FCP-4 compliant
in that we do this per ITL nexus to generate the allowed 1 thru 255
CRN.

In order to support the target side of FC-TAPE, we now pay attention
to more of the PRLI word 3 parameters which will tell us whether
an initiator wants confirmed responses. While we're at it, we'll
pay attention to the initiator view too and report it.

On sending back CTIOs, we will notice whether the initiator wants
confirmed responses and we'll set up flags to do so.

If a response or data frame is lost the initiator sends us an SRR
(Sequence Retransmit Request) ELS which shows up as an SRR notify
and all outstanding CTIOs are nuked with SRR Received status. The
SRR notify contains the offset that the initiator wants us to restart
the data transfer from or to retransmit the response frame.

If the ISP driver still has the CCB around for which the data segment
or response applies, it will retransmit.

However, we typically don't know about a lost data frame until we
send the FCP Response and the initiator totes up counters for data
moved and notices missing segments. In this case we've already
completed the data CCBs already and sent themn back up to the periph
driver. Because there's no really clean mechanism yet in CAM to
handle this, a hack has been put into place to complete the CTIO
CCB with the CAM_MESSAGE_RECV status which will have a MODIFY DATA
POINTER extended message in it. The internal ISP target groks this
and ctl(8) will be modified to deal with this as well.

At any rate, the data is retransmitted and an an FCP response is
sent. The whole point here is to successfully complete a command
so that you don't have to depend on ULP (SCSI) to have to recover,
which in the case of tape is not really possible (hence the name
FC-TAPE).

Sponsored by: Spectralogic
MFC after: 1 month


# 37bb79f1 14-Feb-2011 Marius Strobl <marius@FreeBSD.org>

- Use the correct DMA tag/map pair for synchronize the FC scratch area.
- Allocate coherent DMA memory for the request/response queue area and
and the FC scratch area.

These changes allow isp(4) to work properly on sparc64 with usage of the
IOMMU streaming buffers enabled.

Approved by: mjacob
MFC after: 2 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 8340692f 10-Jun-2010 Matt Jacob <mjacob@FreeBSD.org>

Don't pass a buffer directly as a printflike format string.
Found by: clang
MFC after: 1 month


# a035b0af 02-Jun-2010 Matt Jacob <mjacob@FreeBSD.org>

Various minor and not so minor fixes suggested by Coverity.
In at least one case, it's amazing that target mode worked at all.

Found by: Coverity.
MFC after: 2 weeks


# be5d0cf4 05-Apr-2010 Matt Jacob <mjacob@FreeBSD.org>

This is an MFC of 205712.

D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).


# 739fd8c5 26-Mar-2010 Matt Jacob <mjacob@FreeBSD.org>

D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).

MFC after: 1 week


# 87aa0933 01-Mar-2010 Matt Jacob <mjacob@FreeBSD.org>

MFC of 204397: fix problems with fast posting handles


# 443e752d 26-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

Revamp the pieces of some of the stuff I forgot to do when shifting to
32 bit handles. The RIO (reduced interrupt operation) and fast posting
for the parallel SCSI cards were all 16 bit handles. Furthermore,
target mode parallel SCSI only can have 16 bit handles.

Use part of a supplied patch to switch over to using 32 bit handles.
Be a bit more conservative here and only do this for parallel SCSI
for the 12160 (Ultra3) cards. There were a lot of marginal Ultra2
cards, and, frankly, few are findable now for testing.

Fix the target handle routine to only do 16 bit handles for parallel
SCSI cards. This is okay because the upper sixteen bits of the new
32 bit handles is a sequence number to help protect against duplicate
completions. This would be very unlikely to happen with parallel
SCSI target mode, and wasn't present before, so we're no worse off
than we used to be.

While we're at it, finally split the async mailbox completion handlers
into FC and parallel SCSI functions. This makes it much cleaner and
easier to figure out what is or isn't a legal async mailbox completion
code for different card classes.

PR: kern/144250
Submitted partially by: Charles D
MFC after: 1 week


# 9090fd5b 11-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

Pick up some changes the the MFC missed.


# 7733cf8f 11-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

MFC a number of changes from head for ISP (203478,203463,203444,202418,201758,
201408,201325,200089,198822,197373,197372,197214,196162). Since one of those
changes was a semicolon cleanup from somebody else, this touches a lot more.


# 54e81dec 03-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

Yet another target mode compilation error.


# 97efa6dd 03-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

Fix target mode compilation problem with previous delta


# c8b8a2c4 03-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

Redo how commands handles are created and managed and implement sequence
numbers and handle types in rational way. This will better protect from
(unwittingly) dealing with stale handles/commands.

Fix the watchdog timeout code to better protect itself from mistakes.

If we run an abort on a putatively timed out command, the command
may in fact get completed, so check to make sure the command we're
timing it out is still around. If the abort succeeds, btw, the command
should get returned via a different path.


# c2ede4b3 07-Jan-2010 Martin Blapp <mbr@FreeBSD.org>

Remove extraneous semicolons, no functional changes.

Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 1 week


# 2df76c16 31-Jul-2009 Matt Jacob <mjacob@FreeBSD.org>

Add 8Gb support (isp_2500). Fix a fair number of configuration and
firmware loading bugs.

Target mode support has received some serious attention to make it
more usable and stable.

Some backward compatible additions to CAM have been made that make
target mode async events easier to deal with have also been put
into place.

Further refinement and better support for NP-IV (N-port Virtualization)
is now in place.

Code for release prior to RELENG_7 has been stripped away for code clarity.

Sponsored by: Copan Systems

Reviewed by: scottl, ken, jung-uk kim
Approved by: re


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 4607e8ee 02-Jul-2007 Matt Jacob <mjacob@FreeBSD.org>

Recover from some major omissions/problems with the 24XX port.
First, we were never correctly checking for a 24XX Status Type 0
response- that cased us to fall through to evaluate status for
commands as if this were a 2100/2200/2300 Status Type 0 response.
This is *close*, but not quite the same. This has been reported
to be apparent with some wierd lun configuration problems with
some arrays. It became glaringly apparent on sparc64 where none
of the correct byte swap things were done.

Fixing this omission then caused a whole universe shifting debug
cycle of endian issues for the 2400. The manual for 24XX f/w turns
out to be wrong about the endianness of a couple of entities. The
lun and cdb fields for the type 7 request are *not* unconditionally
big endian- they happen to be opposite of whatever the endian of
the current machine type is. Same with the sense data for the
24XX type 0 response.

While we're at it investigate and resolve some NVRAM endian
issues.

Approved by: re (ken)
MFC after: 3 days


# 9a1b0d43 01-Apr-2007 Matt Jacob <mjacob@FreeBSD.org>

Temporarily desupport simultaneous target and initiator mode.

When the linux port changes were imported which split the
target command list to be separate from the initiator command
list and the handle format changed to encode a type in the handle
the implications to the function isp_handle_index (which only
the NetBSD/OpenBSD/FreeBSD ports use) were overlooked.

The fault is twofold: first, the index into the DMA maps
in isp_pci is wrong because a target command handle with
the type bit left in place caused a bad index (and panic)
into dma map. Secondly, the assumption of the array
of DMA maps in either PCS or SBUS attachment structures is
that there is a linear mapping between handle index and
DMA map index. This can no longer be true if there are
overlapping index spaces for initiator mode and target
mode commands.

These changes bandaid around the problem by forcing us
to not have simultaneous dual roles and doing the appropriate
masking to make sure things are indexed correctly. A longer
term fix is being devloped.


# 5f634111 22-Mar-2007 Matt Jacob <mjacob@FreeBSD.org>

MFP4: a) Some constification from NetBSD (gcc 4.1.2)
b) Split default param fetching/setting into scsi and fibre functions
and retry the fibre fetch more than once.

MFC after: 1 week


# e48b2487 09-Mar-2007 Matt Jacob <mjacob@FreeBSD.org>

Fix some stupid copyright mistakes that have been there for quite some time.


# 04697f7a 17-Nov-2006 Matt Jacob <mjacob@FreeBSD.org>

Make the SAN login/logout stuff more common between different chipsets
and provied an isp_control entry point so that the outer layers can
do PLOGI/LOGO explicitly. Add MS IOCB support. This completes the cycle
for base support for SMI-S.


# 2cad1d98 15-Nov-2006 Matt Jacob <mjacob@FreeBSD.org>

Increase the timeout for some SAN commands.

Only complain about FC Reponse errors if they're nonzero.

Shorten some PortID printouts for local loop.

Add an internal isp_xcmd_t data structure which we'll use for some
CT-Passthru support as part of adding SMI-S.


# e49f99cd 15-Nov-2006 Matt Jacob <mjacob@FreeBSD.org>

minor change to reduce some diff noise


# f7c631bc 14-Nov-2006 Matt Jacob <mjacob@FreeBSD.org>

Push things closer to path failover by implementing loop down and
gone device timers and zombie state entries. There are tunables
that can be used to select a number of parameters.

loop_down_limit - how long to wait for loop to come back up before
declaring
all devices dead (default 300 seconds)

gone_device_time- how long to wait for a device that has appeared
to leave the loop or fabric to reappear (default 30 seconds)

Internal tunables include (which should be externalized):

quick_boot_time- how long to wait when booting for loop to come up

change_is_bad- whether or not to accept devices with the same
WWNN/WWPN that reappear at a different PortID as being the 'same'
device.

Keen students of some of the subtle issues here will ask how
one can keep devices from being re-accepted at all (the answer
is to set a gone_device_time to zero- that effectively would
be the same thing).


# 10365e5a 01-Nov-2006 Matt Jacob <mjacob@FreeBSD.org>

Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.


# b4110d46 04-Aug-2006 Matt Jacob <mjacob@FreeBSD.org>

Fix na_fcentry_t to not have a lun field. Fix indentation in handly
the notify structs. Fix messages in isp_got_msg_fc to print out the
loop id of the sender- not the wwpn which will be synthesized later,
if possible, in the outer layers. Put in debug printouts to pair
a notify ack to a notify so one can see the start/close of an
immediate notify event. Put in spsace for TASK MANAGEMENT response
flags (which we don't do yet).


# 799881e0 16-Jul-2006 Matt Jacob <mjacob@FreeBSD.org>

Some rearrangement of headers to minimize diffs with outside of
FreeBSD repository and to clean up the license header so as to
not pollute the license with file function.

Zero all mailbox structures prior to use (just in case). Change
the outgoing mailbox count for INIT_FIRMWARE to be correct.


# 8c4e89e2 21-Apr-2006 Matt Jacob <mjacob@FreeBSD.org>

Redo some code based upon issues found by Coverity.


# 1dae40eb 14-Feb-2006 Matt Jacob <mjacob@FreeBSD.org>

a) clean up some declaration stuff (i.e., make more modern with respect
to getting rid u_int for uint and so on).

b) Turn back on 64 bit DAC support. Cheeze it a bit in that we have two
DMA callback functions- one when we have bus_addr_t > 4 bits in width and
the other which should be normal. Even Cheezier in that we turn off setting
up DMA maps to be BUS_SPACE_MAXADDR if we're in ISP_TARGET_MODE. More work
on this in a week or so.

c) Tested under amd64 and 1MB DFLTPHYS, sparc64, i386 (PAE, but insufficient
memory to really test > 4GB). LINT check under amd64.

MFC after: 1 month


# 53af7d22 02-Feb-2006 Matt Jacob <mjacob@FreeBSD.org>

Remove use of inlines and use the functions as a library.

Larger code space, possibly performance hit, but more portable.
Certainly less questionable use of inlining.

Suggested by: des