History log of /linux-master/drivers/scsi/qla2xxx/qla_fw.h
Revision Date Author Comments
# d9ba85ef 26-Aug-2022 Anil Gurumurthy <agurumurthy@marvell.com>

scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status

Add new API to obtain the NVMe Parameters region status from the Auxiliary
Image Status bitmap.

Link: https://lore.kernel.org/r/20220826102559.17474-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 2b659ed6 08-Jun-2022 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: edif: Send LOGO for unexpected IKE message

If the session is down and the local port continues to receive AUTH ELS
messages, the driver needs to send back LOGO so that the remote device
knows to tear down its session. Terminate and clean up the AUTH ELS
exchange followed by a passthrough LOGO.

Link: https://lore.kernel.org/r/20220608115849.16693-3-njavali@marvell.com
Fixes: 225479296c4f ("scsi: qla2xxx: edif: Reject AUTH ELS on session down")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 5224f790 14-Feb-2022 Gustavo A. R. Silva <gustavoars@kernel.org>

treewide: Replace zero-length arrays with flexible-array members

There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

This code was transformed with the help of Coccinelle:
(next-20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)

@@
identifier S, member, array;
type T1, T2;
@@

struct S {
...
T1 member;
T2 array[
- 0
];
};

UAPI and wireless changes were intentionally excluded from this patch
and will be sent out separately.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>


# 4de067e5 16-Aug-2021 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: edif: Add N2N support for EDIF

For EDIF + N2N to work, firmware 9.8 or later is required. The driver will
pause after PLOGI to allow app to authenticate. Once authentication
completes, app will tell driver to do PRLI.

Link: https://lore.kernel.org/r/20210817051315.2477-6-njavali@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 44d01857 23-Jun-2021 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: edif: Add encryption to I/O path

Some FC adapters from Marvell offer the ability to encrypt data in flight
(EDIF). This feature requires an application to act as an authenticator.

After the completion of PLOGI, both sides have authenticated and PRLI
completed, encrypted I/Os are allowed to proceed.

- Use new firmware API to encrypt traffic on the wire

- Add driver parameter to enable|disable EDIF feature

# modprobe qla2xxx ql2xsecenable=1

Link: https://lore.kernel.org/r/20210624052606.21613-10-njavali@marvell.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Co-developed-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Signed-off-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Co-developed-by: Duane Grigsby <duane.grigsby@marvell.com>
Signed-off-by: Duane Grigsby <duane.grigsby@marvell.com>
Co-developed-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 9efea843 23-Jun-2021 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: edif: Add detection of secure device

Some FC adapters from Marvell offer the ability to encrypt data in flight
(EDIF). This feature requires an application to act as an authenticator.

There is no FC switch scan service that can indicate whether a device is
secure or non-secure.

In order to detect whether the remote port supports encrypted operation,
driver must first do a PLOGI with the remote device. On completion of the
PLOGI, driver will query firmware to see if the device supports secure
login. To do that, driver + firmware must advertise the security bit via
PLOGI's service parameter. The remote device shall respond using the same
service parameter whether it supports it or not.

Link: https://lore.kernel.org/r/20210624052606.21613-8-njavali@marvell.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Co-developed-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Signed-off-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Co-developed-by: Duane Grigsby <duane.grigsby@marvell.com>
Signed-off-by: Duane Grigsby <duane.grigsby@marvell.com>
Co-developed-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# dd30706e 23-Jun-2021 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: edif: Add key update

Some FC adapters from Marvell offer the ability to encrypt data in flight
(EDIF). This feature requires an application to act as an authenticator.

As part of the authentication process, the authentication application will
generate a SADB entry (Security Association/SA, key, SPI value, etc). This
SADB is then passed to driver to be programmed into hardware. There will be
a pair of SADB's (Tx and Rx) for each connection.

After some period, the application can choose to change the key. At that
time, a new set of SADB pair is given to driver. The old set of SADB will
be deleted.

Add a new bsg call (QL_VND_SC_SA_UPDATE) to allow application to allow
adding or deleting SADB entries. Driver will not keep the key in
memory. It will pass it to HW.

It is assumed that application will assign a unique SPI value to this SADB
(SA + key). Driver + hardware will assign a handle to track this unique
SPI/SADB.

Link: https://lore.kernel.org/r/20210624052606.21613-6-njavali@marvell.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Co-developed-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Signed-off-by: Larry Wisneski <Larry.Wisneski@marvell.com>
Co-developed-by: Duane Grigsby <duane.grigsby@marvell.com>
Signed-off-by: Duane Grigsby <duane.grigsby@marvell.com>
Co-developed-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Rick Hicksted Jr <rhicksted@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a0465859 11-Jan-2021 Bikash Hazarika <bhazarika@marvell.com>

scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe

FW needs to wait for an ABTS response before completing the I/O.

Link: https://lore.kernel.org/r/20210111093134.1206-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 3aac0c0f 03-Sep-2020 Arun Easi <aeasi@marvell.com>

scsi: qla2xxx: Honor status qualifier in FCP_RSP per spec

FCP-4 (referred FCP-4 rev-2b) identifies the earlier known "retry delay
timer" field as "status qualifier", which is described in SAM-5 and later
specs. This fix makes appropriate driver side modifications to honor the
new definition. The SAM document referred was SAM-6 rev-5.

Link: https://lore.kernel.org/r/20200904045128.23631-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 77adf3f0 08-Sep-2020 Thomas Gleixner <tglx@linutronix.de>

scsi/qla2xxx: Convert to SPDX license identifiers

All files in this driver directory contain the following notice:

See LICENSE.qla2xxx for copyright and licensing details.

LICENSE.qla2xxx can be found in Documentation/scsi/. The file contains:

- A copyright notice

This copyright notice is redundant as all files contain the same
copyright notice already

- A license notice

You may modify and redistribute the device driver code under the
GNU General Public License (a copy of which is attached hereto as
Exhibit A) published by the Free Software Foundation (version 2).

This can be replaced with the corresponding SPDX license identifier
(GPL-2.0-only) in the source files which reference this license
file.

- The full GPLv2 license text

A redundant copy of LICENSES/preferred/GPL-2.0

Remove the notices and add the SPDX license identifier GPL-2.0-only to the
source files.

Finally remove the now redundant LICENSE.qla2xxx file.

Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Acked-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 58101f15 14-Jul-2020 Shyam Sundar <ssundar@marvell.com>

scsi: qla2xxx: Address a set of sparse warnings

Fix the following sparse warnings:

drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: restricted __le16 degrades to integer
drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: cast to restricted __le16

Link: https://lore.kernel.org/r/20200715043358.21668-1-njavali@marvell.com
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 9f2475fe 30-Jun-2020 Shyam Sundar <ssundar@marvell.com>

scsi: qla2xxx: SAN congestion management implementation

* Firmware Initialization with SCM enabled based on NVRAM setting and
firmware support (About Firmware).

* Enable PUREX and add support for fabric performance impact
notification (FPIN) handling.

* Allocate a default PUREX item for each vha to handle memory allocation
failures in ISR.

Link: https://lore.kernel.org/r/20200630102229.29660-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 21038b09 18-May-2020 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Fix endianness annotations in header files

Annotate members of FC protocol and firmware dump data structures as big
endian. Annotate members of RISC control structures as little endian.
Annotate mailbox registers as little endian. Annotate the mb[] arrays as
CPU-endian because communication of the mb[] values with the hardware
happens through the readw() and writew() functions. readw() converts from
__le16 to u16 and writew() converts from u16 to __le16. Annotate 'handles'
as CPU-endian because for the firmware these are opaque values.

Link: https://lore.kernel.org/r/20200518211712.11395-15-bvanassche@acm.org
CC: Hannes Reinecke <hare@suse.de>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# e544b720 18-May-2020 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions

This patch does not change any functionality.

Link: https://lore.kernel.org/r/20200518211712.11395-9-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# d9ab5f1f 18-May-2020 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE

This patch fixes the following Coverity complaint without changing any
functionality:

CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
is expected.

memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);

Link: https://lore.kernel.org/r/20200518211712.11395-8-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 246ee225 18-May-2020 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Fix spelling of a variable name

Change "offet" into "offset" in a variable name.

Link: https://lore.kernel.org/r/20200518211712.11395-2-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Arun Easi <aeasi@marvell.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# b0f18eee 26-Feb-2020 Andrew Vasquez <andrewv@marvell.com>

scsi: qla2xxx: Update BPM enablement semantics.

commit e4e3a2ce9556 ("scsi: qla2xxx: Add ability to autodetect SFP
type") takes a heavy handed approach to BPM (Buffer Plus Management)
enablement:

1) During hardware initialization, if an LR-capable transceiver is
recognized, the driver schedules a disruptive post-initialization
chip-reset (ISP-ABORT) to allow the BPM settings to be sent to the
firmware. This chip-reset will result in (short-term) path-loss to
all fc-rports and their attached SCSI devices.

2) LR-detection is triggered during any link-up event, resulting in a
refresh and potential chip-reset

Based on firmware-team guidance, upon LR-capable transceiver
recognition, the driver's hardware initialization code will now
re-execute firmware with the new BPM settings, then continue on with
driver initialization. To address the second issue, the driver
performs LR-capable detection upon the driver receiving a
transceiver-insertion asynchronous event from firmware. No short-term
path loss is needed with this new semantic.

Link: https://lore.kernel.org/r/20200226224022.24518-10-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Andrew Vasquez <andrewv@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 576bfde8 12-Feb-2020 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Add deferred queue for processing ABTS and RDP

This patch adds deferred queue for processing aborts and RDP in the driver.

Link: https://lore.kernel.org/r/20200212214436.25532-14-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 09e382bc 12-Feb-2020 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Cleanup ELS/PUREX iocb fields

This patch does the following to improve RDP processing:

- Rename field port_id to d_id in ELS and PUREX iocb structs to match FW
spec.

- Remove redundant comments from ELS and PUREX iocb structs.

- Refactor fields in ELS iocb struct for error subcode common access.

- Properly use error subcode fields in rdp processing routine.

- Add print logs for alloc failure in purex rdp processing routine.

Link: https://lore.kernel.org/r/20200212214436.25532-13-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# d83a80ee 12-Feb-2020 Joe Carnuccio <joe.carnuccio@qlogic.com>

scsi: qla2xxx: Add vendor extended RDP additions and amendments

This patch adds RDP command support in the driver. With the help of new
ql2xsmartsan parameter, driver will use PUREX IOCB mode to send RDP command
to switch and will be able to receive various diagnostic data.

Link: https://lore.kernel.org/r/20200212214436.25532-8-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 818c7f87 12-Feb-2020 Joe Carnuccio <joe.carnuccio@qlogic.com>

scsi: qla2xxx: Add changes in preparation for vendor extended FDMI/RDP

This patch prepares code for implementing Vendor specific extended FDMI/RDP
commands. It also addes support for MBC_GET_PORT_DATABASE and
MBC_GET_RNID_PARAMS commands.

Link: https://lore.kernel.org/r/20200212214436.25532-7-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a27747a2 18-Dec-2019 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Improve readability of the code that handles qla_flt_header

Declare qla_hw_data.flt as a qla_flt_header pointer instead of as a void
pointer. Add a zero-length array at the end of struct qla_flt_header to
make it clear that qla_flt_header and qla_flt_region are contiguous. This
patch removes several casts but does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20191219004706.39039-1-bvanassche@acm.org
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 118f01e7 17-Dec-2019 Quinn Tran <qutran@marvell.com>

scsi: qla2xxx: Fix RIDA Format-2

This patch fixes offset for Format-2 data structure for Report ID
Acquisition. This caused driver to set remote_nport_id to 0x0000 in N2N
configuration. In a scenario where initiator's WWPN is higher than target's
WWPN, driver will assign 0x00 as target nport-id, which results into login
failure.

Link: https://lore.kernel.org/r/20191217220617.28084-12-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a530bf69 03-Dec-2019 Michael Hernandez <mhernandez@marvell.com>

scsi: qla2xxx: Added support for MPI and PEP regions for ISP28XX

This patch adds support for MPI/PEP region updates which is required with
secure flash updates for ISP28XX.

Fixes: 3f006ac342c0 ("scsi: qla2xxx: Secure flash update support for ISP28XX")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191203223657.22109-3-hmadhani@marvell.com
Signed-off-by: Michael Hernandez <mhernandez@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 84ed362a 12-Sep-2019 Michael Hernandez <mhernandez@marvell.com>

scsi: qla2xxx: Dual FCP-NVMe target port support

Some storage arrays advertise FCP LUNs and NVMe namespaces behind the same
WWN. The driver now offers a user option by way of NVRAM parameter to
allow users to choose, on a per port basis, the kind of FC-4 type they
would like to prioritize for login.

Link: https://lore.kernel.org/r/20190912180918.6436-9-hmadhani@marvell.com
Signed-off-by: Michael Hernandez <mhernandez@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 9933c050 08-Aug-2019 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Make it explicit that ELS pass-through IOCBs use little endian

According to the firmware documentation the firmware expects all ELS
pass-through IOCB parameters in little endian format. Make this explicit.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# d4556a49 17-Apr-2019 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware

This patch makes the code easier to read and more compact.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 15b7a68c 17-Apr-2019 Bart Van Assche <bvanassche@acm.org>

scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures

Introduce two structures for the (DMA address, length) combination instead
of using separate structure members for the DMA address and length. This
patch fixes several Coverity complaints about 'cur_dsd' being used to write
outside the bounds of structure members.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 3f006ac3 12-Mar-2019 Michael Hernandez <mhernandez@marvell.com>

scsi: qla2xxx: Secure flash update support for ISP28XX

This patch adds support for Secure flash update with ISP28xx.

Signed-off-by: Michael Hernandez <mhernandez@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 5fa8774c 12-Mar-2019 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Add 28xx flash primary/secondary status/image mechanism

Includes the following:
- correction to 27xx image status struct;
- factoring of 27xx image status validating routines to make common;
- image status generation compare that works across zero wrap;
- bsg interface to report current active images (as loaded by driver).

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Mike Hernandez <mhernandez@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# f8f97b0c 12-Mar-2019 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Cleanups for NVRAM/Flash read/write path

This patch does following:

- Clean up NVRAM code.
- Optimizes reading of primary/secondary flash image validation.
- Remove 0xff mask and make correct width in FLT structure.
- Use endian macros to assign static fields in fwdump header.
- Correct fdwt checksum calculation.
- Simplify ql_dump_buffer() interface usage.
- Add endianizers to 27xx firmware image validator.
- fixes compiler warnings for big endian architecture.

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 72a92df2 12-Mar-2019 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Correctly report max/min supported speeds

This patch fixes reported speed for min_link and max_supported speed. Also
rename sysfs nodes link_speed and max_supported to be consistent with
{min|max}_suuported_speed.

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Mike Hernandez <mhernandez@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# ecc89f25 12-Mar-2019 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Add Device ID for ISP28XX

This patch adds PCI device ID ISP28XX for Gen7 support. Also signature
determination for primary/secondary flash image for ISP27XX/28XX is aded as
part of Gen7 support.

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 8777e431 02-Aug-2018 Quinn Tran <quinn.tran@cavium.com>

scsi: qla2xxx: Migrate NVME N2N handling into state machine

This patch fixes regression introduced for the N2N support for FC-NVMe. For
FC-NVMe with N2N connection, instead of FW initiating the Login, Driver
starts Login process. This patch migrates that new process from a
standalone path into existing session management state machine. With this
state change now driver will not wait for pull NPort ID from FW.

Fixes: edd05de197592 ("scsi: qla2xxx: Changes to support N2N logins")
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 9cd883f0 28-Dec-2017 Quinn Tran <quinn.tran@cavium.com>

scsi: qla2xxx: Fix session cleanup for N2N

When connection type is N_Port to N_Port (point-to-point), there
is a possibilty where initiator will not send PLOGI request and
will directly send PRLI. In N2N connection the port has higher
port name sends the PLOGI but not allow to send PRLI if is a
target mode. Only initiator is allowed to send PRLI.

Current driver code deletes old session when it receives PLOGI
request. If we will not receive PLOGI request then we will not
delete old session and create new session. Add check for N2N
with PRLI receive only and trigger cleanup. For this case, the
cleanup requires individual cmd abort instead of using implicit
logout as a broad stroke flush.

Signed-off-by: Krishna Kant <krishna.kant@purestorage.com>
Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# edd05de1 13-Oct-2017 Duane Grigsby <duane.grigsby@cavium.com>

scsi: qla2xxx: Changes to support N2N logins

If we discovered a topology that is N2N then we will issue a login to
the target. If our WWPN is bigger than the target's WWPN then we will
initiate login, otherwise we will just wait for the target to initiate
login.

[mkp: many whitespace errors]

Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com>
Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Tested-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 1f4c7c38 23-Aug-2017 Joe Carnuccio <joe.carnuccio@cavium.com>

scsi: qla2xxx: Add LR distance support from nvram bit

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 92d4408e 23-Aug-2017 Sawan Chandak <sawan.chandak@cavium.com>

scsi: qla2xxx: Add support for minimum link speed

Signed-off-by: Sawan Chandak <sawan.chandak@cavium.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 7401bc18 21-Jun-2017 Duane Grigsby <duane.grigsby@cavium.com>

scsi: qla2xxx: Add FC-NVMe command handling

This patch adds logic to handle the completion of FC-NVMe commands and
creates a sub-command in the SRB command structure to manage NVMe
commands.

Signed-off-by: Darren Trapp <darren.trapp@cavium.com>
Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com>
Signed-off-by: Anil Gurumurthy <anil.gurumurhty@cavium.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a5d42f4c 21-Jun-2017 Duane Grigsby <duane.grigsby@cavium.com>

scsi: qla2xxx: Add FC-NVMe port discovery and PRLI handling

Added logic to change the login process into an optional PRIL step for
FC-NVMe ports as a separate operation, such that we can change type to
0x28 (NVMe).

Currently, the driver performs the PLOGI/PRLI together as one operation,
but if the discovered port is an NVMe port then we first issue the PLOGI
and then we issue the PRLI. Also, the fabric discovery logic was changed
to mark each discovered FC NVMe port, so that we can register them with
the FC-NVMe transport later.

Signed-off-by: Darren Trapp <darren.trapp@cavium.com>
Signed-off-by: Duane Grigsby <duane.grigsby@cavium.com>
Signed-off-by: Anil Gurumurthy <anil.gurumurhty@cavium.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 41dc529a 19-Jan-2017 Quinn Tran <quinn.tran@cavium.com>

qla2xxx: Improve RSCN handling in driver

Current code blindly does State Change Registration when
the link is up. Move SCR behind fabric scan, so that arbitrated
loop scan would not get erroneous error message.

Some of the other improvements are as follows

- Add session deletion for TPRLO and send acknowledgment for TPRLO.
- Enable FW option to move ABTS, RIDA & PUREX from RSPQ to ATIOQ.
- Save NPort ID early in link init.
- Move ABTS & RIDA to ATIOQ helps in keeping command ordering and
link up sequence ordering.
- Save Nport ID and update VP map so that SCSI CMD/ATIO won't be dropped.
- fcport alloc does the initializes memory to zero. Remove memset to
zero since It might corrupt link list.
- Turn off Registration for State Change MB in loop mode.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>


# 726b8548 19-Jan-2017 Quinn Tran <quinn.tran@cavium.com>

qla2xxx: Add framework for async fabric discovery

Currently code performs a full scan of the fabric for
every RSCN. Its an expensive process in a noisy large SAN.

This patch optimizes expensive fabric discovery process by
scanning switch for the affected port when RSCN is received.

Currently Initiator Mode code makes login/logout decision without
knowledge of target mode. This causes driver and firmware to go
out-of-sync. This framework synchronizes both initiator mode
personality and target mode personality in making login/logout
decision.

This patch adds following capabilities in the driver

- Send Notification Acknowledgement asynchronously.
- Update session/fcport state asynchronously.
- Create a session or fcport struct asynchronously.
- Send GNL asynchronously. The command will ask FW to
provide a list of FC Port entries FW knows about.
- Send GPDB asynchronously. The command will ask FW to
provide detail data of an FC Port FW knows about or
perform ADISC to verify the state of the session.
- Send GPNID asynchronously. The command will ask switch
to provide WWPN for provided NPort ID.
- Send GPSC asynchronously. The command will ask switch
to provide registered port speed for provided WWPN.
- Send GIDPN asynchronously. The command will ask the
switch to provide Nport ID for provided WWPN.
- In driver unload path, schedule all session for deletion
and wait for deletion to complete before allowing driver
unload to proceed.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
[ bvanassche: fixed spelling in patch description ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>


# 061b5c3c 06-Jul-2016 Sawan Chandak <sawan.chandak@qlogic.com>

qla2xxx: Fix BBCR offset

Fixes: 969a619 ("qla2xxx: Add support for buffer to buffer credit value for ISP27XX.")
Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 969a6199 26-Jan-2016 Sawan Chandak <sawan.chandak@qlogic.com>

qla2xxx: Add support for buffer to buffer credit value for ISP27XX.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 4243c115 26-Jan-2016 Sawan Chandak <sawan.chandak@qlogic.com>

qla2xxx: Add support for online flash update for ISP27XX.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# e05fe292 25-Sep-2014 Chad Dupuis <chad.dupuis@qlogic.com>

qla2xxx: Honor FCP_RSP retry delay timer field.

Parse the retry delay timer field from the FCP response data and if:

- It is not zero
- The SCSI status is busy or queue full

return SCSI_MLQUEUE_TARGET_BUSY for the number of milliseconds specified
in the retry delay timer field.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# b5a340dd 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com>

qla2xxx: Add diagnostic port functionality.

Add support for the D-port (diagnostic port) fabric switch feature.

(Fabric Switch initiates loopback style port testing)

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 7c9c4766 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com>

qla2xxx: Add FA-WWN functionality.

Add support for the FA-WWN (fabric assigned wwn) fabric switch feature.

(Fabric Assigned World Wide Port Name)

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 98aee70d 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com>

qla2xxx: Add endianizer to max_payload_size modifier.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 5921cda6 11-Apr-2014 Himanshu Madhani <himanshu.madhani@qlogic.com>

qla2xxx: Remove mapped vp index iterator macro dead code.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 7c6300e3 11-Apr-2014 Joe Carnuccio <joe.carnuccio@qlogic.com>

qla2xxx: ISP27xx queue index shadow registers.

For ISP27xx use the request/response queue index shadow registers
to avoid directly access them on the PCI bus.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# bd21eaf9 11-Apr-2014 Armen Baloyan <armen.baloyan@qlogic.com>

qla2xxx: Change copyright year to 2014 in all the source files.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# f73cb695 26-Feb-2014 Chad Dupuis <chad.dupuis@qlogic.com>

[SCSI] qla2xxx: Add support for ISP2071.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 7ec0effd 26-Aug-2013 Atul Deshmukh <atul.deshmukh@qlogic.com>

[SCSI] qla2xxx: Add support for ISP8044.

[jejb: checkpatch fixes]
Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 1e63395c 07-Feb-2013 Saurav Kashyap <saurav.kashyap@qlogic.com>

[SCSI] qla2xxx: Update the copyright information.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# a865c50a 07-Feb-2013 Saurav Kashyap <saurav.kashyap@qlogic.com>

[SCSI] qla2xxx: Get VPD information from common location for CNA.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# aa230bc5 30-Jan-2013 Arun Easi <arun.easi@qlogic.com>

[SCSI] qla2xxx: Enable target mode support for ISP83xx.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 4ea2c9c7 21-Nov-2012 Joe Carnuccio <joe.carnuccio@qlogic.com>

[SCSI] qla2xxx: Add acquiring of risc semaphore before doing ISP reset.

Try to acquire the semaphore; if semaphore is hung then acquire it by force.
The ISP reset clears the semaphore, thereby implicitly releasing it.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 46152ceb 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com>

[SCSI] qla2xxx: Update the driver copyright.

Update the driver copyright from 2003-2011 to 2003-2012.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 7d613ac6 22-Aug-2012 Santosh Vernekar <santosh.vernekar@qlogic.com>

[SCSI] qla2xxx: IDC implementation for ISP83xx.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# a9b6f722 22-Aug-2012 Saurav Kashyap <saurav.kashyap@qlogic.com>

[SCSI] qla2xxx: Implementation of bidirectional.

[jejb: merge fix for introduced warning]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# d6a03581 22-Aug-2012 Masanari Iida <standby24x7@gmail.com>

[SCSI] qla2xxx: Fix typo in qla2xxx files

Correct spelling typo within qla2xxx files.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 6246b8a1 09-Feb-2012 Giridhar Malavali <giridhar.malavali@qlogic.com>

[SCSI] qla2xxx: Enhancements to support ISP83xx.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Nigel Kirkland <nigel.kirkland@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 8cb2049c 16-Aug-2011 Arun Easi <arun.easi@qlogic.com>

[SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.

Driver needs to update protection bytes for uninitialized sectors as they are
not DMA-d.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Reviewed-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# fa96d927 10-May-2011 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Properly set the dsd_list_len for dsd_chaining in cmd type 6.

The firmware spec has the fcp_data_dseg_len defined as a 32-bit
value, while the corresponding field in the driver structure has
it defined as a 16-bit value.

Cc: stable@kernel.org
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 07e264b7 30-Mar-2011 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# de7c5d05 23-Jul-2010 Giridhar Malavali <giridhar.malavali@qlogic.com>

[SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# bad75002 04-May-2010 Arun Easi <arun.easi@qlogic.com>

[SCSI] qla2xxx: T10 DIF support added.

Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 09ff701a 19-Mar-2010 Sarang Radke <sarang.radke@qlogic.com>

[SCSI] qla2xxx: Add APEX support.

Allows priority setting for FCP_CMNDs.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# cad454b1 19-Mar-2010 Santosh Vernekar <santosh.vernekar@qlogic.com>

[SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs.

We now enable/disable "Additional Receive Credits" in f/w based on nvram
parameter "Extended_BB_Credits" bit (i.e. Enhanced-Features: at offset 0x196).
This is applicable only for GEN2 CNAs.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 9a069e19 12-Jan-2010 Giridhar Malavali <giridhar.malavali@qlogic.com>

[SCSI] qla2xxx: Add BSG support for FC ELS/CT passthrough and vendor commands.

[jejb: fixed printk casting issues]
Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# f9e899eb 31-Jul-2009 Shyam Sundar <shyam.sundar@qlogic.com>

[SCSI] qla2xxx: Pad IOCB structure for size requirements.

One byte added to make the IOCB structure satisfy
size requirements.

Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# aed10881 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Query supported RISC registers bits in determining a paused-state.

ISP24xx and above must query the host-status register, not HCCR.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# cbc8eb67 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs.

In case the onboard firmware is unable to be read or loaded for
operation, attempt to fallback to a limited-operational firmware
image stored in a different flash region. This will allow a user
to reflash and correct a board with proper operational firmware.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 11bbc1d8 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Export TLV data on supported ISPs.

Firmware currently provides PB and PGF TLVs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# ce0423f4 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Export XGMAC statistics on supported ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# fc3ea9bc 06-Apr-2009 Harish Zunjarrao <harish.zunjarrao@qlogic.com>

[SCSI] qla2xxx: Correct hard-coded address of a second-port's NVRAM.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 3d79038f 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Always use an FLT's NVRAM/VPD region information.

Rather than assuming a particular layout of the data. Applies to
recent ISPs only.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 6e181be5 26-Mar-2009 Lalit Chandivade <lalit.chandivade@qlogic.com>

[SCSI] qla2xxx: Add reset capabilities for application support.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 1d2874de 24-Mar-2009 Joe Carnuccio <joe.carnuccio@qlogic.com>

[SCSI] qla2xxx: Add Flash-Access-Control support for recent ISPs.

Given the low-level interface varies from one flash-part
manufacturer to the next, the Flash-Access-Control (FAC) mailbox
command makes the specific flash type transparent to the driver
by encapsulating a basic set of accessor and update routines.
Use these new routines where applicable by querying FAC opcode
get-sector-size at init-time.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# b64b0e8f 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Pass in optional extended-initialization control block.

Recent ISPs use this data to configure FCF information.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 8a659571 08-Feb-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Properly acknowledge IDC notification messages.

To ensure smooth operations amongst the FCoE and NIC side
components of the ISP81xx chip, the FCoE driver (qla2xxx) must
ensure the 10gb NIC driver (qlge) does not timeout waiting for
IDC (Inter-Driver Communication) acknowledgments. The
acknowledgment requirements are trivial -- a simple mirroring of
incoming mailbox registers during the AEN to a process-context
capable mailbox command.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 3a03eb79 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add ISP81XX support.

Codes to support new FCoE boards.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 73208dfd 09-Dec-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com>

[SCSI] qla2xxx: add support for multi-queue adapter

Following changes have been made.
1. qla_hw_data structure holds an array for request queue pointers,
and an array for response queue pointers.
2. The base request and response queues are created by default.
3. Additional request and response queues are created at the time of vport
creation. If queue resources are exhausted during vport creation, newly
created vports use the default queue.
4. Requests are sent to the request queue that the vport was assigned
in the beginning.
5. Responses are completed on the response queue with which the request queue
is associated with.

[fixup memcpy argument reversal spotted by davej@redhat.com]
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 272976ca 11-Sep-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add NPIV-Config Table support.

To instatiate pre-configured vport entities defined within an
HBA's flash memory.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# c00d8994 11-Sep-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add Flash Layout Table support.

The Flash Layout Table (FLT) present on many recent HBAs encodes
flash usage information, organizes data stored into separate
regions and presents the information uniformly to the driver.
Use this information rather than using specific hard-coded values
based on ISP type.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# c6852c4c 24-Apr-2008 Seokmann Ju <seokmann.ju@qlogic.com>

[SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.

There were several places in the driver which could cause byte
ordering problem as provided by Al Viro
<viro@ZenIV.linux.org.uk>.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 4d4df193 03-Apr-2008 Harihara Kadayam <harihara.kadayam@qlogic.com>

[SCSI] qla2xxx: Add ISP84XX support.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 523ec773 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add midlayer target/device reset support.

Now that infrastructure is present within the midlayer and there
is a clear distinction between what is expected from a device and
target reset, convert the current device-reset codes to a
target-reset, and add codes to perform a proper device-reset (LUN
reset).

In the process of adding reset support, collapse and consolidate
large sections of mailbox-command (TMF issuance) codes,
generalize the two 'wait-for-commands-to-complete' functions, and
add a generic-reset routine for use by midlayer reset functions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 7d232c74 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add Flash Descriptor Table layout support.

The Flash Descriptor Table (FDT) present on many recent HBAs
encodes flash accessing characteristics of the flash-part used on
the HBA. Use this information during flash manipulation (writes)
rather than using specific hard-coded values based on queried
manufacturer and device IDs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# cb8dacbf 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add hardware trace-logging support.

Recent ISPs have a region within FLASH which acts as a repository
for the logging of serious hardware and software failures.
Currently, the region is large enough to support up to 255
entries.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 01e58d8e 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# df613b96 17-Jan-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.

FCE support enables the firmware to record FC extended link
services and basic link services frames which have been
transmitted and received by the ISP. This allows for a limited
view of the FC traffic through the ISP without using a FC
analyzer. This can be useful in situations where a physical
connection to the FC bus is not possible.

The driver exports this information in two ways -- first, via a
debugfs node exported for all supported ISPs under:

<debugfs_mount_point>/qla2xxx/qla2xxx_<host_no>/fce

where a read of the 'fce' file will provide a snapshot of the
firmware's FCE buffer; and finally, the FCE buffer will be
extracted during a firmware-dump scenario.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 00b6bd25 17-Jan-2008 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Trace-Control naming cleanups.

In preparation for FCE (Fibre Channel Event) tracing support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# eb66dc60 12-Nov-2007 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Correct NPIV support for recent ISPs.

Firmware will export to software the maximum number of vports
supported for any given firmware version and ISP type. Use this
information rather than the current hardcoding of limitations
within the driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# b5836927 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Query additional RISC registers during ISP25XX firmware dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 05236a05 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Query additional RISC information during a pause.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# b7cc176c 20-Sep-2007 Joe Carnuccio <joe.carnuccio@qlogic.com>

[SCSI] qla2xxx: Allow region-based flash-part accesses.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c3a2f0df 19-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add ISP25XX support.

Large code-reuse from ISP24xx, consolidate RISC memory
extraction routines during firmware-dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 2c3dfe3f 05-Jul-2007 Seokmann Ju <seokmann.ju@qlogic.com>

[SCSI] qla2xxx: add support for NPIV

Following patch adds support for NPIV (N-Port ID Virtualization) to the
qla2xxx.

- supported within switched-fabric topologies only.
- supports up to 63 virtual ports on each physical port.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3ea66e28 23-Jun-2006 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Correctly set the firmware NOS/OLS timeout during initialization.

Original code incorrectly assigned it to the driver's
link-down-timeout value (a value in seconds).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# d4c760c2 23-Jun-2006 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add NVRAM 'Disable Serdes' bit support.

The host section of ISP24xx NVRAMs contain a new bit which
allows a user to selectively disable ports of an HBA. These
ports (hosts) will not be presented to the midlayer.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 441d1072 17-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Remove obsolete firmware-loader-module support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# ed17c71b5 17-May-2006 Ravi Anand <ravi.anand@qlogic.com>

[SCSI] qla2xxx: Use FW calculated residual count for underrun handling.

With ISP24XX and ISP54XX parts.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 6f641790 09-Mar-2006 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add VPD sysfs attribute.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# fa90c54f 27-Oct-2005 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Update license.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 661c3f6c 27-Oct-2005 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Use midlayer's int_to_scsilun() function.

While populating command type 6 and 7 IOCBs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# ae91193c 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Update copyright banner.

Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# fa2a1ce5 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Code scrubbing.

Code scrubbing.

- Remove trailing whitespace from driver files.
- Remove unused #defines and inlines.
- Standardize on C comments (// -> /* */)

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3d71644c 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com>

[SCSI] qla2xxx: Add ISP24xx definitions.

Add ISP24xx definitions.

Add requisite structure definitions and #define's for ISP24xx
support. Also drop volatile modifiers from device_reg_* register
layouts as the members are never really accessed, only their
offsets within the layout are used during reads and writes.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>