History log of /drivers/scsi/qla2xxx/qla_def.h
Revision Date Author Comments
642ef983861a6a7ba41e9d7c0aa4da8f6d5af5bf 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Add ha->max_fibre_devices to keep track of the maximum number of targets.

Add a field to the qla_hw_data struct to allow us to set the maximum number of
fabric devices on a per adapter basis based on ISP type.

[jejb: fix up missing rval = QLA_SUCCESS to prevent uninit var warning]
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>
7a67735b07aa1bf61b8535eec6f6fb6474cf7926 09-Feb-2012 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Cache swl during fabric discovery.

Rather than continuously allocating and freeing swl within the discovery
process, simply pre-allocate it the first time that it's needed, cache it
through the rest of the lifecycle of the driver and free it at module unload.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
733a95bd39d79c5759c1f7016a94c08e7367076d 09-Feb-2012 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Remove EDC sysfs interface.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
af11f64dfd634e8116b7c4e2422e0e0c698b91c1 09-Feb-2012 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Perform implicit logout during rport tear-down.

During rport tear-down, make sure we do an implicit LOGO of the fcport in our
firmware to try to clear any residual commands associated with that fcport.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
b3b02e6e9512636d5a1839b325e4722e80cda90d 09-Feb-2012 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Handle change notifications based on switch scan results.

Instead of processing each RSCN individually, use only the name server results
from the switch to tell the existance of a given fcport.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
9ba56b95a588906a65664a9299a9f8ac1a0f6a91 09-Feb-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Consolidation of SRB processing.

Rework the structures related to SRB processing to minimize the memory
allocations per I/O and manage resources associated with and completions
from common routines.

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>
6246b8a1d26c7cdb77fd2f3f3578d4db025d5c9e 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>
67ddda353c4e26ba23a199ae64fdf283b669469b 09-Feb-2012 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers.

ISP2200 adapters only have 24 mailbox registers so read only that many.

Reported-by: Olatunji Ruwase <oor@cs.cmu.edu>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5780790ee6836ad64648c0905fcf15e073aad19b 18-Nov-2011 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Ensure there's enough request-queue space for passthru IOCBs.

The driver should ensure there's a sufficient number of IOCBs
to satisfy the number of scatter-gather entries specified in the
command. Add a 'count' to the control structure, srb_ctx, to use
in qla2x00_alloc_iocbs().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
706f457d000c8f334a1af37508d946a561d5929a 18-Nov-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Added a new entry to ISP specific function pointers structure.

Add a new function to ISP specific pointers structure to take care of ISP
specific PCI IO space configuration.

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>
cfb0919c12a33132f75fb91971bbd8bdd44ebb90 18-Nov-2011 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Update to dynamic logging.

This patch contains minor fixes to our new logging infrastructure:

- Remove extranous messages.
- Re-add 'nexus' and 'hdl' information.
- Adjusted the message ids to fill up the holes.
- Display FCP_CMND priority on update.
- Log only mail box error conditions.
- Do not print "Firmware ready **** FAILED ****" if cable is unplugged.
- Drop noisy 'fw_state...curr time...' message.
- Correct nexus display during abort.
- Add a special case error-logging set to '1'.
- Catagorize I/O exception display handling.
- Correct the bsg msg code printing.
- Dont use dynamic logging after host is removed.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
08de2844c626511cfd1db9c36e5e7d126707f780 16-Aug-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Add support for ISP82xx to capture dump (minidump) on failure.

Minidump allows us to catpure a snapshot of the firmware/hardware states at the
time of failure for further analysis.

[jejb: added missing #include <linux/vmalloc.h>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> ]
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>
e02587d777bfb398f70709fd3a92fa0154959003 16-Aug-2011 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.

This fix:
- Disables app tag peeking; correct tag check will be added when the
SCSI API is available.
- Always derive ref_tag from scsi_get_lba()
- Removes incorrect swap of FCP_LUN in FCP_CMND
- Moves app-tag error check before ref-tag check. The reason being,
currently there is no interface in SCSI to retrieve the app-tag
for protection I/Os, so driver puts zero for app-tag in the
firmware interface, but requests not to validate it, but when a
ref-tag error is detected by firmware, it would put
expected/actual tags for all the protection tags (guard/app/ref).
As driver checks for app tag error first, a ref-tag error is
incorrectly flagged as app-tag error.
- Convert HBA specific checks to capability based.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ec426e106c410b000ac590b6e776d5a6cd9bccd9 30-Mar-2011 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Log fcport state transitions when debug messages are enabled.

Add the inline function qla2x00_set_port_state() so that when a fcport state
transition happens we can log the state transition if debug messages are
enabled.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
07e264b76d1db5794614ca3d726fdf1c0399dac0 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>
25985edcedea6396277003854657b5f3cb31a628 31-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>
7190575f7a48c82fd99363748544023739dc4bb8 24-Feb-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Abort pending commands for faster recovery during ISP reset.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
794a5691147652387f4a2ffa890c5c1983e38849 22-Dec-2010 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add sysfs node for displaying board temperature.

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>
579d12b58abb4bd1161728f0a4a2524258ecf0a3 22-Dec-2010 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.

Support is added for quiescence mode. This feature is for P3P
adapters. Any of the functions can put the firmware into quiescence
state. All the others have to ack that request. During quiescence mode
current commands are processed and all the new incoming I/Os are
blocked. Loop resync is performed after firmware comes out of
quiescence state.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
7992abfc8b851456f2dfac3229ecb3a5e5637df0 24-Nov-2010 Mike Hernandez <michael.hernandez@qlogic.com> [SCSI] qla2xxx: Change MSI initialization from using incorrect request_irq parameter.

IRQF_SHARED flag should not be set when calling request_irq for MSI
since this interrupt mechanism cannot be shared like standard INTx.

Signed-off-by: Mike Hernandez <michael.hernandez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1e6d0670921ea4e736b172e9a3c32a2ba0c33f6a 15-Oct-2010 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Remove port down retry count.

This patch removes the use of the port down retry counter as a mechanism to
update a fcport state. The internal driver counter is a residual carry-over
from pre-FC-transport aware driver inteaction. The ql2xport_down_retry module
parameter and NVRAM set ha->port_down_retry_count remain in order to seed the
fc-host's default dev-loss-tmo.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
58548cb51a824276c34a3227a4917d2e2ded0daa 04-Sep-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Increase SG table size to support large IO size per scsi command.

The sg table size is increased from 128 to 1024 to support multiple sg lists
and number of sg elements per scsi command.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
b1d46989c12ec4d93f274ca8378bb1a6014d244a 04-Sep-2010 Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> [SCSI] qla2xxx: Handle MPI timeout indicated by AE8002

In case the MPI times out, the FW issues an async event AE8002
to indicate this to every FCoE function. The FC/FCoE driver is
required to handle this, by doing a soft reset and issuing a
Write MPI register mailbox command to reset the MPI.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
feafb7b1714cf599a6d0fed45801ab3f66046cbd 03-Sep-2010 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Fix vport delete issues

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
de7c5d059dbd245ad80011725f9c86f560e61fff 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>
4d78c973ef2d21e90ff55f97489d663a0959a93f 23-Jul-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Rearranged and cleaned up the code for processing the pending commands.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
0f2d962f4d120e93b4d74d13c2e8038e9e4358b9 23-Jul-2010 Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> [SCSI] qla2xxx: Check for golden firmware and show version if available

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
e8c72ba51a159f5d1cb195d3fb47262c782939d9 23-Jul-2010 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into Nx_Ports

The default method that qla2xxx uses is the GID_PT nameserver command to
get a list of Nx_Ports. This patch adds a GFF_ID call for each port
returned by GID_PT to get the FC4 type. If the FC4 type is not FCP SCSI
then the qla2xxx driver will not record that port in it's port database.
For switches that do not support the GFF_ID command, the behavior will be
for qla2xxx to store that port anyways.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
d94d10e7277069801b4e31b40770314a8421f996 23-Jul-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Removed dependency for SRB structure for Marker processing

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
cdbb0a4f31c486e4f6fb6e673a892f4f5205f91c 29-May-2010 Santosh Vernekar <santosh.vernekar@qlogic.com> [SCSI] qla2xxx: Handle outstanding mbx cmds on hung f/w scenarios.

Outstanding mailbox commands, have no way to recover on f/w hung, and we
timeout on waiting for mbx response. This in turn affects the recovery process
as follows:
- We might already be in dpc while waiting for mbx to complete, so recovery for
that pci function will never get invoked. Reset Timeout (10 sec) is far less
than mbx timeout (30 sec).
- Other mbx cmds will get stuck due to serial mbx access.

Solution is to identify fw-hung scenario and handle outstanding mbx commands to
have an early-exit instead of waiting for response.
Other mbx commands waiting for access will also do an early-exit if fw-hung is
still applicable.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
9c2b297572bf3cc36d26520cd8f7e7ef4cb857f8 29-May-2010 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.

Used bootloder address from FLT while loading FW from flash as well.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
23f2ebd17a13835c5b34994d2c2e5faacc127947 29-May-2010 Sarang Radke <sarang.radke@qlogic.com> [SCSI] qla2xxx: Add internal loopback support for ISP81xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
083a469db4ecf3b286a96b5b722c37fc1affe0be 29-May-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Correct use-after-free oops seen during EH-abort.

Hold a reference to the srb (sp) while aborting an I/O -- as the
I/O can/will complete from within the interrupt-context.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
f1af6208c8cef81e313ec2e64b44e783c3a11c13 05-May-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Updates to ISP82xx support.

1) Allow transition to NEED RESET state only from READY state for ISP82xx.
2) Avoid infinite ISP aborts when chip reset fails.
3) Code cleanup to remove some of the unused debug code.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
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>
bad750028917a7b804623701d0674e46c6012c18 05-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>
3822263eb1e74821ad1ae886ddd2184ae9395ff7 05-May-2010 Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> [SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.

Currently we can only issue the task management (TM)
commands via the mailbox mechanism. This is a limitation,
since only one mailbox command can be issued at a time.
The purpose of this effort is to provide support for
issuing and processing the respose to TM and Marker
IOCBs asynchronously. Towards achieving this, the
consolidated srb architecture that is currently used for
BSG and IOCB/Logio commands has been enhanced and used.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
4916392b56921b4aaaeaca3ef492135f42fbb5f2 05-May-2010 Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> [SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.

Currently, BSG and IOCB/Logio commands have a different
framework (srb structs). The purpose of this effort is to
consolidate them into a generalized framework for these
as well as other asynchronous operations in the future.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
5ff1d58410ffb160b388d622ef0c6a0411a05559 05-May-2010 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
99b0bec7bbf3350d1a920a7138fa62c456a8ecf1 05-May-2010 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.

Prepare CTX infrastructure for additional asynchronous
executions, add generic done() operator, pull CMD definitions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
6a03b4cd78f3f2695a2d0e6343d555b3de0e67c1 05-May-2010 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [SCSI] qla2xxx: Add char device to increase driver use count

The driver should not be unloaded if any application is using it.
To disallow driver unload, driver use count must be incremented.
Application uses this char device as handle and increases driver
use count to avoid possible driver unload.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
a9083016a5314b3aeba6e0d2e814872e72168c08 13-Apr-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Add ISP82XX support.

Enhanced the driver to support new FCoE host bus adapter.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
09ff701a177b116c6c15b6e501e58fbfb306b424 20-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>
6e98016ca077c5c751167bfdb1a3a2a3bee581cf 20-Mar-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Re-organized BSG interface specific code.

1. Segregate BSG interface specific code to new files.
2. Handle multiple vendor specific commands indepedently.
3. Reorganised support for reset, management and update FCoE firmware commands.
4. Fixed memory leak issue in Loopback.
5. Added new vendor command to support iiDMA using BSG interface.
6. Proper cleanup of dma mapped and dma allocated buffers for BSG request.

[jejb: fix up conflict and merge in Jiri Slaby lock imbalance patch]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
9a069e196767d7b87184fd8d8211d22bb5b9c0b8 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>
f08b7251c40090b8c522a306642944cd7322eebb 12-Jan-2010 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct FCP2 recovery handling.

The driver did not account for non-tape devices needing to employ
proper FCP2 recovery. Driver now checks the FCP2-capable flag
only, rather than using a midlayer-determined flag (TYPE_TAPE).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
858808019313f217d63ec4ad26686e6fb7b08c19 16-Dec-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Extend base EEH support in qla2xxx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
3155754a6b7985a80c41d84dd06530ff543f52a8 02-Dec-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: fix for multiqueue in MISX disabled case

Fix to accommodate a hardware bug in multiqueue mode that does not
work properly when acknowledgement of MSIX Interrupts is disabled.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
c45dd30551c371cb1e7a742136b8b36f6aba63f8 02-Dec-2009 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Queue depth ramp up/down modification changes.

Removed the module parameters ql2xqfulltracking and ql2xqfullrampup
since the queue depth ramp up/down functionality is moved to scsi-ml.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
b5d0329f424df20c67d0d9ee979fbd2b8b5ed74d 14-Oct-2009 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Set the size of the host buffer used to fetch DCBX and XGMAC parameters to 4K.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
3420d36cac2f1d28fc99290de12dd66dfaf65d8e 14-Oct-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add firmware-dump kobject uevent notification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
8474f3a02a18e18459663ad88951822c62a45068 25-Aug-2009 Santosh Vernekar <santosh.vernekar@qlogic.com> [SCSI] qla2xxx: Correctly set FCF_TAPE_PRESENT flag based on scsi-device.

In fabric-login based on iop BIT_8 firmware notifies presence of
a FCP2 device and not necessarily a TAPE device. So instead of
setting FCF_TAPE_PRESENT flag there we set it using
scsi_device->type after mid-layer scan recognises "type" of the
device.

It also adds a new flag FCF_FCP2_DEVICE for any future use.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
ac280b670e6d6666667aba02324e2fc50bd96ae7 20-Aug-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add asynchronous-login support.

ISPs which support this feature include 23xx and above.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
cf53b069f52ae3f83dec1acd339e3c3a2e979478 20-Aug-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Generalize srb structure usage.

Lay groundwork for adding alternative asynchronous operations by
generalize and extending the SRB structure. This allows for
follow-on patches to add support for:

- Asynchronous logins.
- ELS/CT passthru requests.
- Loopback requests.
- Non-blocking mailbox commands (ABTS, Task Management, etc).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
7163ea815170f8c5d56ead27d7e6fa3fa1f9844b 05-Aug-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Fix to ensure driver works in sinlge queue mode if multiqueue fails

When the multiqueue mode fails to work, the driver falls back on single
queue mode. This ensures that the firmware is reinitialized with single
queue options and all the resources are readjusted accordingly.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
0fd30f77693f4fef32d30d4801cd21dcd487c2f0 13-Jul-2009 Dave Jones <davej@redhat.com> [SCSI] qla2xxx: Fix __LITTLE_ENDIAN definition warnings

On ppc64, gcc 4.4 spews lots of..

drivers/scsi/qla2xxx/qla_def.h:1485:7: warning: "__LITTLE_ENDIAN" is not defined

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
f999f4c1961fe5399fd66c95860cc2d5d67e591e 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Reduce lock-contention during do-work processing.

Queued work processing will now be serialized with its own
lower-priority spinlock. This also simplifies the work-queue
interface for future work-queue consumers.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
cbc8eb67da11a4972834f61fe4729f4c037a17c9 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>
40859ae5f13534624cc35a05179b4f93ecbf531a 03-Jun-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
11bbc1d896637c1d83b11cc3b97ed3d6d2076c63 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>
ce0423f4a23317d0166addd7d6fcc4a0fa95e751 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>
e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Use port number to compute nvram/vpd parameter offsets.

Read adapter's physical port number from interrupt pin register
and use it instead of pci function number to offset into the
nvram to obtain the port's configuration parameters.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
67c2e93ae7465a3e279503ceddd7bd153d74bcf8 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Remove reference to request queue from scsi request block.

srbs used to maintain a reference to the request queue on which
it was enqueued. This is no longer required as the request queue
pointer is now maintained in the scsi host that issues the srb.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
68ca949cdb04b4dc71451a999148fbc5f187a220 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Add CPU affinity support.

Set the module parameter ql2xmultique_tag to 1 to enable this
feature. In this mode, the total number of response queues
created is equal to the number of online cpus. Turning the block
layer's rq_affinity mode on enables requests to be routed to the
proper cpu and at the same time it enables completion of the IO
in a response queue that is affined to the cpu in the request
path.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2afa19a9377ca61b9489e44bf50029574fbe63be 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Add QoS support.

Set the number of request queues to the module paramater
ql2xmaxqueues. Each vport gets a request queue. The QoS value
set to the request queues determines priority control for queued
IOs. If QoS value is not specified, the vports use the default
queue 0.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
bad7001c200458c24864df6f2b1b66548bca7c75 07-Apr-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Export additional FCoE attributes for application support.

Cull and export VN_Port MAC address and VLAN_ID information on
supported FCoE ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
6749ce362d38b47bd4669ccc0cafcc0014bff6e9 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Don't cache VPD data for newer ISPs.

As updates will occur using low-level option-rom manipulation
routines.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
24a081386e4236e10e80af4c62d5f6e68feb2081 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Explicitly set the execution-throttle with recent ISPs.

Firmware semantics changed for 24xx and above ISPs in their
handling of the specified execution-throttle passed during
firmware initialization. The original codes use of a theoretical
maximum (0xffff, as carried over from earlier ISPs) could in fact
act as a throttle in some circumstances. Now set the value based
of the firmware's own 'resource' (exchange IOCBs) capabilities.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
d743de66754a662399bd9fe7da7a34e189f71876 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Reduce request queue-size overhead with recent ISPs.

The original code to 'resize request-queues' based on iocb-counts
and employed during early ISP23xx testing was too
overly-pessimistic with regards to latencies in the firmware
pulling requests. Recent ISPs can easily keep up processing a
stream of commands from an abbreviated (effectively, half the
original size) queue.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3d79038f92841052aced9aec43c9d9aa864d28ab 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>
ad0ecd61f4ad3260ca8f7216765ddbb1a10677ea 24-Mar-2009 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Add EDC-update support.

Interface allows for the update of onboard EDC firmware
present on mezzanine ISP25xx type cards.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
ddb9b12632ab28460c281d50963bbe3eeda5984a 24-Mar-2009 Shyam Sundar <shyam.sundar@qlogic.com> [SCSI] qla2xxx: Cleanup unused flags and #defines.

General cleanup of extraneous/legacy crud.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2533cf671da0603129c8af9c31c735e1d2654e20 24-Mar-2009 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla2xxx: Correct ISP abort semantics for NVRAM, VPD, and flash update.

Ensure that an ISP-abort has completed before performing any
update. After the update do not wait for an ISP-abort completion,
instead just wait until the ISP is reset. This avoids long
delays due to waiting for loop ready in qla2x00_abort_isp().

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>
1d2874de809a14e6780246b99a18bbc0fc0a8f2a 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>
55a961581fd34632bf724dd144c0dbf740c9fede 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update MPI/PHY version retrieval codes.

Reflects layout and format of latest specification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
b64b0e8fd964ce637794d4aaa772db1ae4298ea9 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>
08029990b25b76b1bc167336358bd21812567f2a 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Refactor request/response-queue register handling.

Original code used an overabundance of indirect pointers to
function helpers. Instead, the driver can exploit the immutable
properties of a queue's ISP-association and ID, which are both
known at queue initialization-time.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
8a659571eccfde1df9bd057d67be51d1aaa0e2db 09-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>
3a03eb797ce76ae8868a1497e9e746ad0add1e3b 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>
444786d7fdd770f67e29a068ec8ee981d323f7a7 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use proper request/response queues with MQ instantiations.

Original code would inadvertanly place I/Os on the default
request-queue. Also, correctly pass in the proper MSI-X vector
during response-queue initialization.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
bb99de6703526ebed42e29b8dee402df235f28c7 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump.

In preparation for new ISP types with varying dump procedures.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
124f85e6cc0290a85adb7e14cd90e96105f4f9fb 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Don't fallback to interrupt-polling during re-initialization with MSI-X enabled.

ROMs in recent ISPs have MSI-X support, so it's no longer
necessary for the driver to fallback to interrupt polling during
ISP re-initialization.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1ded85e2850b7b890fb6b51241429ed685ec2763 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Remove support for reading/writing HW-event-log.

Software should not touch this region of flash, as the firmware
will be the only writer and consumer of the region.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17d98630a4f2a38537618503ad0c7ec97ba461ca 18-Dec-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: changes in multiq code

Following changes have been made:
1. Scan outstanding commands only in the queue where it is submitted
2. Update queue registers directly in the fast path
3. Queue specific BAR is remapped only for multiq capable adapters

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 10-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>
7b867cf76fbcc8d77867cbec6f509f71dce8a98f 06-Nov-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Refactor qla data structures

Following changes have been made to the qla2xxx FC driver in
preparation for the multi- queue and future SR IOV hardware.

1. scsi_qla_host structure has been changed to contain scsi host
specific data only.

2. A new structure, qla_hw_data is created to contain HBA specific
hardware data.

3. Request and response IO specific data strucures are created.

4. The global list of fcports for the hba is not maintained anymore,
instead a fcport list is construted on per scsi_qla_host.

Signed-of-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
821b3996001508e872582dcafc7575021f122728 25-Oct-2008 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla2xxx: Correct Atmel flash-part handling.

Use correct block size (4K) for erase command 0x20 for Atmel
Flash. Use dword addresses for determining sector boundary.

Cc: Stable Tree <stable@kernel.org>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16dbef4a831782466b10d4ae56837c5ba17d1948 16-Aug-2008 Yinghai Lu <yhlu.kernel@gmail.com> PCI: change MSI-x vector to 32bit

We are using 28bit pci (bus/dev/fn + 12 bits) as irq number, so the
cache for irq number should be 32 bit too.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
42379b1122bab7f9aefdbd4b7004a6fa89dfbae5 20-Aug-2008 Yinghai Lu <yhlu.kernel@gmail.com> pci: change msi-x vector to 32bit

we are using 28bit pci (bus/dev/fn + 12 bits) as irq number, so the
cache for irq number should be 32 bit too.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
272976ca186982f7bbc4f22876c53d6c9f7b6e32 12-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>
c00d8994d91e51aa6b891ad0e877f66cc1011de2 12-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>
49fd462a1ba4a1b9bfbfe01d279d506017d85492 12-Sep-2008 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [SCSI] qla2xxx: Add input/output byte-count statistics.

Currently Firmware does not have counters for input megabytes and
output megabytes, therefore driver counts these values depending
on the status of the scsi command and direction of the command.
The values are exported in the FC_HOST path.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3fd7f938831b7f2e7b6103118ad1a455f6f03110 14-Aug-2008 Matthew Wilcox <matthew@wil.cx> [SCSI] qla2xxx: Remove semaphore.h

Now that qla2xxx has been converted to mutexes, it no longer needs the
semaphore include.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
c795c1e4b68a74536f0fb18744d0e381ceb1f37e 14-Aug-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Explicitly tear-down vports during PCI remove_one().

During internal testing, we've seen issues (hangs) with the
'deferred' vport tear-down-processing typically accompanied with
the fc_remove_host() call. This is due to the current
implementation's back-end vport handling being performed by the
physical-HA's DPC thread where premature shutdown could lead to
latent vport requests without a processor.

This should also address a problem reported by Gal Rosen
(http://marc.info/?l=linux-scsi&m=121731664417358&w=2) where the
driver would attempt to awaken a previously torn-down DPC thread
from interrupt context by implicitly calling wake_up_process()
rather than the driver's qla2xxx_wake_dpc() helper. Rather, than
reshuffle the remove_one() device-removal code, during unload,
depend on the driver's timer to wake-up the DPC process, by
limiting wake-ups based on an 'unloading' flag.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1ee2714632ce3f7e6477069b41cb685112f5f217 11-Jul-2008 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Retrieve board serial-number and description from VPD.

Recent ISPs have this information written at manufacturing time,
so use the information. This also reduces future churn of the
qla_devtbl.h file contents, as the driver can now depend on the
information to be present in VPD.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
711c1d916be083a5bf4fbc8e66201e7e9f8b9334 11-Jul-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Cleanup NPIV related functions

Removed repeated or unnecessary operations during vport
creation/deletion.

Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
032d8dd739eccbb39c78c901beece70062d1820d 11-Jul-2008 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [SCSI] qla2xxx: Add LIP count to FC-transport statistics.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
e5f5f6f72b10c4c6209f0522a7c5b27079d64429 11-Jul-2008 Harish Zunjarrao <harish.zunjarrao@qlogic.com> [SCSI] qla2xxx: Track total number of ISP aborts.

This parameter counts the total number of ISP aborts during
driver execution. The value is exported through a DEVICE_ATTR()
off the scsi_host.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
5f3a9a207f1fccde476dd31b4c63ead2967d934f 11-Jul-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
6c2f527cb84cbd7d2d8a668c979e70bf78980ccc 13-May-2008 matthias@kaehlcke.net <matthias@kaehlcke.net> [SCSI] qla2xxx: Convert vport_sem to a mutex

The semaphore vport_sem is used as a mutex. Convert it to the
mutex API.

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
6188e10d38b8d7244ee7776d5f1f88c837b4b93f 19-Apr-2008 Matthew Wilcox <matthew@wil.cx> Convert asm/semaphore.h users to linux/semaphore.h

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
73f0f0f24ad898db8316d1c8bf877fbe7b60b015 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Remove unused member (dma_handle) from srb_t structure.

The member is not needed as there's no non-scatter-gather
list I/Os submitted by the upper-layers.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
4d4df1932b6b116aecc81039066fec27f2050762 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>
523ec773b8ffb1c607bc3a54c9526558e3b1eab1 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>
3fe7cfb910ea138ae623d1320c71e2a7a0bdc527 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.

Some switches return 0x09 (Command not supported) as the reason
code for GPSC failure. Check for this code, and disable
additional GPSC queries if found.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
7d232c745ef2ce141cc9d9538421affa32846fdb 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>
587f4cae4a8ce1315c3def2229c2a912637269b6 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Cruft cleanup of functions and structures.

Strip unused (DEBUG-ONLY) enabled functions, inlines, useless
wrappers, and unused DPC flags from the code. Another step in
the migration towards a cleaner (less-crusty) driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
cb8dacbf1110d8bd39413f3116ff1720f757854e 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>
0971de7f56f809f40edae6fd372745e429e970e9 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add FC-transport Asynchronous Event Notification support.

Supported events include LIP, LIP reset, RSCN, link up, and link
down.

To support AEN (and additional forthcoming features), we also
introduce a simple deferred-work construct to manage events which
require a non-atomic sleeping-capable context. This work-list is
processed as part of the driver's standard DPC routine.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
5ab5a4dd5444db0715b5748bab916725138d3a32 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use an rport's scsi_target_id member consistently throughout driver.

Rather than using a duplicate/cached value stored in the driver's
internal fcport structure.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
01e58d8eac93f3b73246b8d0bdee071d9fb85661 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>
da4541b63bbe9a945d7bbc1105f2deacc42ef195 31-Jan-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Access the proper 'physical' port in FC-transport callbacks.

For following fc_host specific attributes, vports rely on the pport.
So, this patch changed way to access the data for those attributes so that
they can access pport's.
- get_host_speed (speed)
- get_host_port_state (port_state)
- get_host_port_type (port_type)
- get_fc_host_stats

Also, added PORT_SPEED_8GB case in the speed attribute for 8Gb HBAs.

Signed-Off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
0948391641918b95d8d96c15089eb5ac156850b3 20-Dec-2007 Benjamin Herrenschmidt <benh@kernel.crashing.org> PCI: Remove users of pci_enable_device_bars()

This patch converts users of pci_enable_device_bars() to the new
pci_enable_device_{io,mem} interface.

The new API fits nicely, except maybe for the QLA case where a bit of
code re-organization might be a good idea but I prefer sticking to the
simple patch as I don't have hardware to test on.

I'll also need some feedback on the cs5520 change.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
df613b96077cee826b14089ae6e75eeabf71faa3 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>
00b6bd25166e2a4bad23c614c10c55993bb2489e 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>
0b05a1f0d68bf4714c37aa7843c31df1866b017a 17-Jan-2008 Marcus Barrow <marcus.barrow@qlogic.com> [SCSI] qla2xxx: Use completion routines.

Instead of abusing the semaphore interfaces for mailbox command
completions.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3776541d8a46347a4924353a192c6ce4a3d04e2e 17-Jan-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Fix for 32-bit platforms with 64-bit resources.

The driver stores the contents of PCI resources into unsigned
long's before ioremapping. This breaks on 32-bit platforms which
support 64-bit MMIO resources.

Correct code by removing the temporary variables used during MMIO
PIO mapping and using resource_size_t where applicable. Also
correct a small typo in a printk() where the wrong region number
was displayed.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
43ef058010c79a967195539bbcdeee8c5b24219d 17-Jan-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Retrieve additional HBA port statistics from recent ISPs.

HBAs supporting these additional counters include ISP24xx and
ISP25xx type boards.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
eb66dc60be5a72bc940458a5adfd400e4d810d49 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>
285d0321d15cf3130b3347a207ceae652ccc95b5 20-Oct-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Make driver (mostly) legacy I/O port free.

Recent ISPs need only the single MMIO BAR to manipulate HW
registers. Unfortunately, ISP21xx, ISP22xx, ISP23xx, and ISP63xx
type cards still require the I/O mapped region to manipulate the
FLASH via the two HW flash-registers (flash_address and
flash_data).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
f363b9434a464e72927b468ba33cb548f482669f 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use shost_priv().

Drop usage of legacy to_qla_host() macro.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
e745759a0f662992327537be4ec01d9a43542fc4 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Remove unused member (list) from srb_t structure.

This change reduces by as much as 16% the memory footprint for
each allocated sbr_t structure requested from the mempool.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
4d0ea24769c81581b8fd25fd7deff281b1b97dee 20-Sep-2007 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Retrieve max-NPIV support capabilities from FW.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8a85e17152e8fb5f04a4791416a4642b260b95cb 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Set correct attribute count during FDMI RPA.

Also remove legacy '/proc' name during OS_DEVICE_NAME
registration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
14e660e677ddd3574247495aae4ef63eb8899072 20-Sep-2007 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Add PCI error recovery support.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
b7cc176c9eb3aa6989ac099efd8bdd6d0eaa784a 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>
c81d04c9e27966c0e4c5650d130f209bff9671f9 26-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Add IO-base-window accessor functions. Merge duplicate
RISC-pause and soft-reset code segments. Drop 'eye-watering'
__iomem casting.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
a3cbdfad15dee42eb2d17d28fd36447082278dc9 13-Aug-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct 8GB iIDMA support.

Original implementation manipulated the FC_GS values for
port-speed. Transition the codes to use the driver's own
internal representations as this makes for a reduction in
duplicate 'conversion' codes throughout the driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
281afe1947d855661754850de29d7530b2ff18dc 26-Jul-2007 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: fix to honor ignored parameters in sysfs attributes

This is a patch to fix 'segmentation fault' issue which was initiated
by Richard Lary <rlary@us.ibm.com>. Thanks again Richard.

- on following sysfs attritute function, changes have made so that both
count and offset input parameters are honored by the functions.
= qla2x00_sysfs_read_nvram()
= qla2x00_sysfs_read_vpd()
- made changes so that NVRAM data to be cached to minimize H/W accesses
during agent querying of the driver's.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c3a2f0dfe1cecac76950f340f540c1a887dd2500 20-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>
fd34f55694a784052981977cb84c50ea369ffc68 20-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Re-factor isp_operations to static structures.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
5881569bb33cdb0d4cdcd44d9ca2551ab04fb811 20-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c76f2c013f7fce83d54acd9d414af7e989e0a1dd 20-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Generalize iIDMA support.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
e428924ccdf4644c58e23c2314ab970ff3afc607 20-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Generalize FW-Interface-2 support.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2c3dfe3f6ad8daff5acdb01713e4f2b116e78136 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>
b889d531b635da66ce2704a47febfed68173d9db 12-Mar-2007 Malahal Naineni <malahal@us.ibm.com> [SCSI] qla2xxx: fix RSCN handling on big-endian systems

qla2xxx driver fails to handle RSCN events affecting area or domain due
to an endian issue on big endian systems. This fixes the port_id_t
structure on big endian systems.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
03c79cc56e4497cbd09d74a73c1bd0d1d9a8a16c 29-Jan-2007 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Remove unnecessary spinlock primitive - mbx_reg_lock.

Since, mailbox commands are executed in a synchronous
manner, there is no need to have a separate spinlock
primitive to protect data/register access shared by callers.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
30c4766213aeb684ee477ac7f36703f9134ac7ad 29-Jan-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Export OptionROM boot-codes version information.

This includes BIOS, EFI, FCODE and firmware versions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d88021a6710e6ed5d1899ba2e54d4638026e277d 29-Jan-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Handle IRQ-0 assignments by the system.

No restriction should be placed on the IRQ number assigned
to a given ISP. Original code incorrectly assumed a
non-zero IRQ number assignment by the system. In these
circumstances the proper freeing of the IRQ (via free_irq())
would not take place.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
a8488abefaa863a0c3a19888f03395adb3f1c6d2 29-Jan-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add MSI-X support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
4346b14942dbb65e5d4fa7ec0e6567c39861ae6c 14-Dec-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Detect GPSC capabilities within a fabric.

Disable subsequent GPSC queries if Fabric Management services do
not support the operation.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
df7baa506c2db1c2d12abd6f05c43f911da55a2e 13-Oct-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct QUEUE_FULL handling.

- Drop queue-depths across all luns for a given fcport
during TASK_SET_FULL statuses.
- Ramp-up I/Os after throttling.
- Consolidate completion-status handling of CS_QUEUE_FULL with
CS_COMPLETE as ISP24xx firmware no longer reports
CS_QUEUE_FULL.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
7d12e780e003f93433d49ce78cfedf4b4c52adc5 05-Oct-2006 David Howells <dhowells@redhat.com> IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
90991c85d398fd46b2b07440b5639eb50dfacb2b 02-Oct-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add support for fabric name FC transport attribute.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d8b4521349274ab610d0b29384c704444e55cbca 02-Oct-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add iIDMA support.

iIDMA (Intelligent Interleaved Direct Memory Access) allows for
the HBA hardware to send FC frames at the rate at which they can
be received by a target device. By taking advantage of the
higher link rate, the HBA can maximize bandwidth utilization in a
heterogeneous multi-speed SAN.

Within a fabric topology, port speed detection is done via a Name
Server command (GFPN_ID) followed by a Fabric Management command
(GPSC). In an FCAL/N2N topology, port speed is based on the HBA
link-rate.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
45ebeb560570fd7ebae29a4105b81874063d5425 01-Aug-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Log Trace/Diagonostic asynchronous events.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
0418726bb5c7b5a70c7e7e82e860d5979d0c78cf 30-Jun-2006 Adrian Bunk <bunk@stusta.de> typo fixes: aquire -> acquire

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
88729e53a4798df20e7a7ef68e0a816f4a268da4 24-Jun-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add DMI (Diagnostics Monitoring Interface) support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d4c760c2119fca982f335d83ff9095479c5d6737 24-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>
a7a167bf7e2d196fc33f292e7b02e90fee03bc9a 24-Jun-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Rework firmware-trace facilities.

- Defer firmware dump-data raw-to-textual conversion to
user-space.
- Add module parameter (ql2xallocfwdump) to allow for per-HBA
allocations of firmware dump memory.
- Dump request and response queue data as per firmware group
request.
- Add extended firmware trace support for ISP24XX/ISP54XX chips.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d4e3e04d789ba23027c66e176b10ac7477906948 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Consolidate firmware-dump handling across ISPs.

Simplify and centralise buffer allocation/deallocation, as
there's no point in having two memory request methods.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
cb63067a772c0149184309a1f232d62c81a93673 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Consolidate "qla2xxx" string usage to a #define.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
441d1072040823feb4950a21094860bfddd310c0 18-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>
4971cd221ad3f1266b87aa0e996d082d91bac2a6 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Remove unused port-type RSCN handling code.

Expandind on the previous commit:

commit 79f89a4296ff22f09baf538d4ff2a6d0c3097a73
Author: andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>
Date: Fri Jan 13 17:05:58 2006 -0800

[SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.

and given:

- the process-context requirements of the FC transport
rport-APIs.
- lack of port-type RSCN processing logic for ISP24xx and newer
chips.

it's time now to remove the state-machine logic from mainline.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
75bc4190701d3c6bdffdc21c8a9e17751de9f77a 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Drop unused driver cruft.

- structure definitions.
- structure members.
- #define's.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
45aeaf1e8e4552ef82d3ff7a06e526e6d635f767 18-May-2006 Ravi Anand <ravi.anand@qlogic.com> [SCSI] qla2xxx: Add support for new flash part.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
4a59f71d7f0d6dd433fd509584352cdd7c62e877 09-Mar-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Further restrict ZIO mode support.

Only support ZIO mode 6 on specific ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
6f6417905cf272337a9762e1f92a1fffa651fcd3 09-Mar-2006 andrew.vasquez@qlogic.com <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>
044cc6c8ec311c4ddeebfcc31c53dea282de70b7 09-Mar-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add ISP54xx support.

Chip is similar in form to our ISP24xx offering.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3 09-Mar-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Convert IS_QLA*() defines to bit-operations.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
39a112403fd4c6cd2215b5a59ff079e42eb824a4 14-Feb-2006 Christoph Hellwig <hch@lst.de> [SCSI] qla2xxx: use kthread_ API

Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.

Also switch from semaphore-based thread wakeup to wake_up_process.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-By: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
854165f4245c4a3b4a8cc363ba2050033151e196 01-Feb-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add support to retrieve/update HBA option-rom.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
f6df144cca19cc60dda6dcce65d236b70cc46494 01-Feb-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add beacon support via class-device attribute.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
392e2f651c8a83484116a407a9f121e534c22b5a 01-Feb-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add host-statistics FC transport attributes.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
04414013bbda644b65537e73f1dacb2821b36811 01-Feb-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add port-speed FC transport attribute.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d97994dc1fddcbb8212b745d9c9c9ce96262155c 20-Jan-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct synchronization issues during rport addition/deletion.

The driver can typically detect port-loss during an
interrupt context (i.e. via interrogation of a status IOCB's
completion status [CS_PORT_LOGGED_OUT]. Due to the calling
requirements of the fc_rport APIs, the driver would defer
removal of the device to the default workqueue. If the
work-item was preceded by an event which caused the port to
obtain visibility (relogin successful, target re-logged into
the topology), deferred removal could inadvertently drop the
rport. The code also no longer defers removal via the
default workqueue, instead opting for use of the driver's
own DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
5433383ef33ed40c9c8a86a4355da344234af2a5 10-Nov-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add full firmware(-request) hotplug support for all ISPs.

Transition driver to exclusively use the request_firmware()
interfaces to retrieve firmware-blobs from user-space. This
will be the default behaviour going forward until the
embedded firmware-binary images are removed from the
upstream kernel.

Upon request, the driver caches the firmware image until the
driver is unloaded.

NOTE: The option is present to allow the user to continue to
use the firmware-loader modules, but, should be considered
deprecated.

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

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
23443b1d6130eff8e1335e4f84eaf0577a331dcf 06-Dec-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct mis-handling of AENs.

A regression in a recent change
33135aa2a568ec1a30e734f18e5315e10516e4f3 caused the driver
to mistakenly drop handling of AENs. Due to the incorrect
handling, ports would not reappear after RSCNs and LIPs.

Drops unused/incorrect compound #define from qla_def.h.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
19a7b4aebf9ad435c69a7e39930338499af4d152 18-Oct-2005 James.Smart@Emulex.Com <James.Smart@Emulex.Com> [SCSI] update fc_transport for removal of block/unblock functions

We recently went back to implement a board reset. When we perform the
reset, we wanted to tear down the internal data structures and rebuild
them. Unfortunately, when it came to the rport structure, things were
odd. If we deleted them, the scsi targets and sdevs would be
torn down. Not a good thing for a temporary reset. We could block the
rports, but we either maintain the internal structures to keep the
rport reference (perhaps even replicating what's in the transport),
or we have to fatten the fc transport with new search routines to find
the rport (and deal with a case of a dangling rport that the driver
forgets).

It dawned on me that we had actually reached this state incorrectly.
When the fc transport first started, we did the block/unblock first, then
added the rport interface. The purpose of block/unblock is to hide the
temporary disappearance of the rport (e.g. being deleted, then readded).
Why are we making the driver do the block/unblock ? We should be making
the transport have only an rport add/delete, and the let the transport
handle the block/unblock.

So... This patch removes the existing fc_remote_port_block/unblock
functions. It moves the block/unblock functionality into the
fc_remote_port_add/delete functions. Updates for the lpfc driver are
included. Qlogic driver updates are also enclosed, thanks to the
contributions of Andrew Vasquez. [Note: the qla2xxx changes are
relative to the scsi-misc-2.6 tree as of this morning - which does
not include the recent patches sent by Andrew]. The zfcp driver does
not use the block/unblock functions.

One last comment: The resulting behavior feels very clean. The LLDD is
concerned only with add/delete, which corresponds to the physical
disappearance. However, the fact that the scsi target and sdevs are
not immediately torn down after the LLDD calls delete causes an
interesting scenario... the midlayer can call the xxx_slave_alloc and
xxx_queuecommand functions with a sdev that is at the location the
rport used to be. The driver must validate the device exists when it
first enters these functions. In thinking about it, this has always
been the case for the LLDD and these routines. The existing drivers
already check for existence. However, this highlights that simple
validation via data structure dereferencing needs to be watched.
To deal with this, a new transport function, fc_remote_port_chkready()
was created that LLDDs should call when they first enter these two
routines. It validates the rport state, and returns a scsi result
which could be returned. In addition to solving the above, it also
creates consistent behavior from the LLDD's when the block and deletes
are occuring.

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
fa90c54f6d27664cc67691f9e52d9165e0c25ca7 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>
4fdfefe52944f5c4132a372ed5c208962a73c3f2 27-Oct-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add support to dynamically enable/disable ZIO.

ISP23xx and ISP24xx chips have support for an adaptive
method of posting SCSI command completions for multiple SCSI
commands during a single system interrupt.

SCSI commands are placed on the system response queue
without interrupting the host until 1) a delay timer
expires; or 2) a SCSI command completes with an error.

As long as the host software (qla2xxx) services the response
queue for completions (this polling is done during
queuecommand()) within the 'delay timer' period, the
firmware will not generate system interrupt.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
f6ef3b1872915c6d69ca36cf4ca16269cb9a73ad 27-Aug-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Stop firmware execution at unintialization time.

On ISP24xx parts, stop execution of firmware during ISP
tear-down.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
06c22bd13f4eb55e291d5a31280b2ae5a70ad00d 27-Aug-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct LED scheme definition.

Original implementation used an overloaded bit in the EFI
parameters. The correct bit is BIT_4 of the special_options
section of NVRAM.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
cca5335caf2d19ef8bd6b833445d2c6ca652a89b 27-Aug-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add FDMI support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
ad3e0edaceb9771be7ffbd7aa24fb444a7ed85bf 27-Aug-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Export class-of-service (COS) information.

Export COS information for the fc_host and fc_remote_port
objects added by the driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
9a168bddc2f13686336a86f8235b84347edac13a 26-Jul-2005 Andrew Morton <akpm@osdl.org> [PATCH] qla: remove anonymous union

Older gcc's dont support anonymous unions, so this driver gets hundreds of
error.

Fortunately the fix is easy...

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
cc4731f5b4539faea237bacd170a27a230a7e724 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct maximum supported lun and target-id definitions.

Correct maximum supported lun and target-id definitions.

The driver uses command-IOCBs which support a maximum lun
value of 0xffff -- correct #define to reflect the change.
Also, remove superfluous MAX_TARGET definition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
ae91193cd5bc80b4d62b1d4f0e7f3fea48f41ccd 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>
fa2a1ce53d4b869b74da9a770770c79f9af64914 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>
fca297037127e524e8f61b3fc1c7a1886e5d757b 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add OS initialization codes for ISP24xx recognition.

Add OS initialization codes for ISP24xx recognition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1c7c63574ff3e568ca374e9f05e30b8d7d64273e 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add MBX command routines for ISP24xx support.

Add MBX command routines for ISP24xx support.

Generalize several routines [qla2x00_load_ram_ext(),
qla2x00_execute_fw(), qla2x00_verify_checksum()] to handle
larger addressing space.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8c958a99d6a903ce4ffaa6780f3425a8567db9e6 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Generalize SNS generic-services routines.

Generalize SNS generic-services routines.

Consolidate completion-status checking while adding support
for the ISP24xx.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
3d71644cf952fd1157a13173237258422ba3c569 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>
ac96202ba096f8fc1ccaf45a2f159a52639ece29 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add pci ids for new ISP types.

Add pci ids for new ISP types.

Move old definitions in local qla_def.h file to pci_ids.h as
well.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
abbd8870b9cb7754a4935826bc9f3c7b029f8b7c 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.

Factor-out ISP specific functions to method-based call tables.

In anticipation of ISP24xx/ISP25xx support, factor-out ISP
specific functions into a method-based call table.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
354d6b2196c8e53e55e8f169804256ab9c72731d 23-Apr-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] remove some dead code in qla2xxx

Original from: Christoph Hellwig <hch@lst.de>

Modified and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
bdf796210e01145fd77bbb3ae644d04f982b6c3b 17-Apr-2005 <andrew.vasquez@qlogic.com> [PATCH] qla2xxx: remove lun discovery codes...

Remove internal lun discovery routines and support
structures.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
8482e118afa0cb4321ab3d30b1100d27d63130c0 17-Apr-2005 <andrew.vasquez@qlogic.com> [PATCH] qla2xxx: add remote port codes...

Add initial support for FC remote port infrastructure.

o Use fc_remote_port...() registration and block/unlock
functions.
o Consolidate 'attribute' (fc-remote/sysfs) helpers into
new qla_attr.c file.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
f4f051ebb40e74ad0ba02d2cb3a6c16b0393472b 17-Apr-2005 <andrew.vasquez@qlogic.com> [PATCH] qla2xxx: remove internal queuing...

Remove internal command queuing from the driver. As is, this
driver cannot tolerate cable-pulls as I/Os will begin to fail
by the upper layers.

o Should be used in conjuction with the
11-fc_rport_adds_2.diff patch.
o Removes qla_listops.h file -- no longer needed.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!