History log of /freebsd-10-stable/sys/dev/isp/ispmbox.h
Revision Date Author Comments
# 318149 10-May-2017 ken

MFC r317740:

Correct loop mode CRN resets to adhere to FCP-4 section 4.10

Prior to this change, the CRN (Command Reference Number) is reset on any
firmware LIP, LOOP DOWN, or LOOP RESET event in violation of FCP-4 which
specifies that the CRN should only be reset in response to a LIP Reset
(LIPyx) primitive. FCP-4 also indicates PLOGI/LOGO and PRLI/PRLO ELS
actions as conditions for resetting the CRN for the associated initiator
port.

These violations manifest themselves when the HBA is removed from the
loop, or a target device is removed (especially during an outstanding
command) without power cycling. If the HBA and and the target device
determine upon re-establishing the loop that no PLOGI or PRLI is
required, and the target does not issue a LIPxy to the initiator, the
CRN for the target will have been improperly reset by the isp driver. As
a result, the target port will silently ignore all FCP commands issued
during the device probe (which will time out) preventing the device from
attaching.

This change corrects thie CRN reset behavior in response to loop state
changes, also introduces CRN resets for the above mentioned ELS actions
as encountered through async PDB change events.

This change also adds cleanup of outstanding commands in isp_loop_dead()
that was previously missing.

sys/dev/isp/isp.c
Add the last login state to debug output when syncing the pdb

sys/dev/isp/isp_freebsd.c
Replace binary statement setting aborted ccb status in
isp_watchdog() with the XS_SETERR macro used elsewhere

In isp_loop_dead(), abort or complete pending commands as done
in isp_watchdog()

In isp_async(), segregate the ISPASYNC_LOOP_RESET action from
ISPASYNC_LIP, ISPASYNC_LOOP_DOWN, and ISPASYNC_LOOP_UP
fallthroughs, and only reset the CRN in the RESET case. Also add
checks to handle false LOOP RESET actions that do not have a
proper associated LIP primitive, and log the primitive in the
debug messages

In isp_async(), remove the goto from ISP_ASYNC_DEV_STAYED, and
only reset the CRN in the DEV_CHANGED action

In isp_async(), when processing an ISPASYNC_CHANGE_PDB status,
reset CRN(s) for the associated nphdl (or all ports) if the
change reason is some form of ELS login/logout. Also remove
assignment to fc since it is not used in the scope

sys/dev/isp/ispmbox.h
Add macro definition for the global N-Port handle, and correct a
macro typo 'PDB24XX_AE_PRLI_DONJE'

sys/dev/isp/ispvar.h
Add macros FCP_AL_DA_ALL, FCP_AL_PA, and FCP_IS_DEST_ALPD for
more legible code when determining if an AL_PD port matches the
portid for a given struct fcparam* by value or by virtue of the
AL_PD port being 0xFF

Submitted by: Reid Linnemann
Sponsored by: Spectra Logic


# 317367 24-Apr-2017 mav

MFC r315913: Add brackets to fix incorrect macro expansion.


# 316399 02-Apr-2017 mav

MFC r315579, r315670: Add initial support for multiple MSI-X vectors.

For 24xx and above use 2 vectors (default and response queue).
For 26xx and above use 3 vectors (default, response and ATIO queues).
Due to global lock interrupt hardlers never run simultaneously now, but
at least this allows to save one regitster read per interrupt.


# 298962 03-May-2016 mav

MFC r297751: 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.


# 292918 30-Dec-2015 mav

MFC r292690: Some polishing for command timeouts handling.


# 292598 22-Dec-2015 mav

MFC r291654, r291727, r291821, r291872, r292034, r292041, r292249, r292042:
Add initial support for 16Gbps FC QLogic chips.


# 291531 30-Nov-2015 mav

MFC r291265: Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.

New name better repsents its meaning for modern chips.


# 291529 30-Nov-2015 mav

MFC r291209: 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.


# 291520 30-Nov-2015 mav

MFC r291160: Add some more asynchronous event status codes.


# 291519 30-Nov-2015 mav

MFC r291159: Add more mailbox command codes.


# 291514 30-Nov-2015 mav

MFC r291080: 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.


# 291511 30-Nov-2015 mav

MFC r291000: Register our FC4 Features in SNS.


# 291507 30-Nov-2015 mav

MFC r290978: Add real initial support for RQSTYPE_RPT_ID_ACQ.


# 291500 30-Nov-2015 mav

MFC r290147: Fix and improve error masking and reporting.


# 291498 30-Nov-2015 mav

MFC r290104: 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.


# 290799 13-Nov-2015 mav

MFC r290042: Fix error code that looks like wrong.


# 290798 13-Nov-2015 mav

MFC r290018: 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.


# 290796 13-Nov-2015 mav

MFC r289937: Try to keep Loop IDs persistent across chip reinits.


# 290792 13-Nov-2015 mav

MFC r289886: Add new field to Abort IOCB.


# 290788 13-Nov-2015 mav

MFC r289855: Minor additions to Status Type 0 IOCB.


# 290787 13-Nov-2015 mav

MFC r289838: Improve INOTs handling for 24xx and above chips.


# 290784 13-Nov-2015 mav

MFC r289681: Some more defines and polishing for INIT_FIRMWARE.


# 290781 13-Nov-2015 mav

MFC r289622: Zero mbox[1] for INIT_FIRMWARE to fix version 7.3 firmware.

While there, add new fields to isp_icb_2400_t structure.


# 290780 13-Nov-2015 mav

MFC r289620: Decode more firmware attributes.


# 288708 05-Oct-2015 mav

MFC r273051 (by imp):
Use the C99 flexible array construct to denote a variable amount of
data rather than the old-school [1] construct. We have required c99
compilers for some time.


# 288708 05-Oct-2015 mav

MFC r273051 (by imp):
Use the C99 flexible array construct to denote a variable amount of
data rather than the old-school [1] construct. We have required c99
compilers for some time.