summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_gbl.h
AgeCommit message (Collapse)Author
2011-05-17[SCSI] qla2xxx: Unify the read/write sfp mailbox command routines.Joe Carnuccio
Make the read/write sfp mailbox command routines uniform, and remove redundancy. Also protect against attempting to do a single byte dma in these routines. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-17[SCSI] qla2xxx: Allow an override of the registered maximum LUN.Andrew Vasquez
The 'max_lun' value registered for each scsi_host is currently capped at 0xffff. The new module parameter can allow for 2nd-level flat-space addressing method-infrastructure to be supported. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-17[SCSI] qla2xxx: Add qla82xx_rom_unlock() function.Chad Dupuis
Encapsulate the unlocking of the ROM lock in a function for better code readability. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Add the ql2xdontresethba module_param.Giridhar Malavali
Also, change the ISP82xx code to only reset if this module_param is set and reset is intended via the QLA82XX_DEV_NEED_RESET case. 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>
2011-05-01[SCSI] qla2xxx: Add test for valid loop id to qla2x00_relogin().Joe Carnuccio
If fabric device has invalid loop id (FC_NO_LOOP_ID) then call qla2x00_find_new_loop_id() to attempt to obtain valid loop id. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Update copyright banner.Andrew Vasquez
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>
2011-02-25[SCSI] qla2xxx: Abort pending commands for faster recovery during ISP reset.Giridhar Malavali
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>
2010-12-23[SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.Giridhar Malavali
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>
2010-12-23[SCSI] qla2xxx: Add sysfs node for displaying board temperature.Andrew Vasquez
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>
2010-12-23[SCSI] qla2xxx: Update FCP priority information to firmware before sending IOsMadhuranath Iyengar
The FCP priority info was not being updated properly in certain situations. Here are the changes that needs to be done to take care of this issue: 1. No need to check fcport->state for FCS_UNCONFIGURED in qla24xx_update_fcport_fcp_prio(), since an invalid loop id check is already performed which is sufficient. 2. Add the missing qla24xx_update_fcport_fcp_prio() function call within qla2x00_update_fcport() function, so that the priority info is updated on every port addition or change. 3. Perform proper adapter types checking. 4. Other changes, associated with DEBUG/printk's and parameter passing. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> 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>
2010-12-23[SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.Saurav Kashyap
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>
2010-10-25[SCSI] qla2xxx: Add module parameter to enable/disable GFF_ID device type check.Chad Dupuis
Add the module parameter ql2xgffidenable to disable/enable the use of the GFF_ID name server command to prevent non FCP SCSI devices from being added to the driver's internal fc_port database. 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>
2010-09-05[SCSI] qla2xxx: Handle MPI timeout indicated by AE8002Madhuranath Iyengar
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>
2010-09-05[SCSI] qla2xxx: Cleanup some dead-code and make some functions static.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-05[SCSI] qla2xxx: Added AER support for ISP82xx.Lalit Chandivade
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Cleanup some dead-code and make some functions static.Andrew Vasquez
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Update copyright banner.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Rearranged and cleaned up the code for processing the ↵Giridhar Malavali
pending commands. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Updates for ISP82xx.Giridhar Malavali
Re-organized and cleaned up the ISP82xx specific code. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Add qla2x00_free_fcports() functionChad Dupuis
This function was added to encapsulate freeing the memory for all the fcports associated with a particular vha. Also added a call to qla2x00_free_fcports() to qla2x00_free_device() to free the memory for all the fcports associated with a vha during device removal. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-28[SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into ↵Chad Dupuis
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>
2010-07-28[SCSI] qla2xxx: Removed dependency for SRB structure for Marker processingGiridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Add internal loopback support for ISP81xx.Sarang Radke
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Clear drive active CRB register when not in use.Giridhar Malavali
The CRB drive active register is cleared when driver is unloaded or when driver enters failed state. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Optionally disable target reset.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: T10 DIF support added.Arun Easi
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>
2010-05-16[SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.Madhuranath Iyengar
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>
2010-05-16[SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.Madhuranath Iyengar
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>
2010-05-16[SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.Andrew Vasquez
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-01[SCSI] qla2xxx: Add ISP82XX support.Giridhar Malavali
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>
2010-04-11[SCSI] qla2xxx: Add APEX support.Sarang Radke
Allows priority setting for FCP_CMNDs. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] qla2xxx: Re-organized BSG interface specific code.Giridhar Malavali
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>
2010-02-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (158 commits) [SCSI] Fix printing of failed 32-byte commands [SCSI] Fix printing of variable length commands [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation [SCSI] scsi_dh_alua: Add IBM Power Virtual SCSI ALUA device to dev list [SCSI] scsi_dh_alua: add netapp to dev list [SCSI] qla2xxx: Update version number to 8.03.02-k1. [SCSI] qla2xxx: EEH: Restore PCI saved state during pci slot reset. [SCSI] qla2xxx: Add firmware ETS burst support. [SCSI] qla2xxx: Correct loop-resync issues during SNS scans. [SCSI] qla2xxx: Correct use-after-free issue in terminate_rport_io callback. [SCSI] qla2xxx: Correct EH bus-reset handling. [SCSI] qla2xxx: Proper clean-up of BSG requests when request times out. [SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands [SCSI] fix duplicate removal on error path in scsi_sysfs_add_sdev [SCSI] fix refcounting bug in scsi_get_host_dev [SCSI] fix memory leak in scsi_report_lun_scan [SCSI] lpfc: correct PPC build failure [SCSI] raid_class: add raid1e [SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes. [SCSI] zfcp: Introduce header file for qdio structs and inline functions ...
2010-02-19[SCSI] qla2xxx: Add firmware ETS burst support.Andrew Vasquez
Can be used to balance NIC/FCoE traffic distribution. Cc: stable@kernel.org 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>
2010-02-19[SCSI] qla2xxx: Correct use-after-free issue in terminate_rport_io callback.Andrew Vasquez
The explicit logout (LOGO) issued at the end of the callback will flush (via normal scsi_cmnd->done()) any outstanding commands (FCP2) the firmware is holding. While iterating through the outstanding_cmnd array in qla2x00_abort_fcport_cmds(), locking and unlocking of the hardware spinlock, opens-up the driver to cases where the processed SRB (sp) could be used after the command completed from interrupt context. Cc: stable@kernel.org 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>
2010-02-08[SCSI] qla2xxx: Obtain proper host structure during response-queue processing.Anirban Chakraborty
Original code incorrectly assumed only status-type-0 IOCBs would be queued to the response-queue, and thus all entries would safely reference a VHA from the IOCB 'handle.' Cc: stable@kernel.org Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-01-18[SCSI] qla2xxx: Add BSG support for FC ELS/CT passthrough and vendor commands.Giridhar Malavali
[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>
2009-12-30[SCSI] qla2xxx: Get the link data rate explicitly during device resync.Michael Hernandez
When the hba port gets logged out of the fabric, or other such transitional state when the physical link is still present, the driver doesn't receive a loop up asyn event (where the link data rate currently gets set). Hence send a explicit mailbox command to get the link rate in such conditions. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] qla2xxx: Queue depth ramp up/down modification changes.Giridhar Malavali
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>
2009-12-04[SCSI] qla2xxx: Retrieve firmware's maximum number of supported FCFs.Andrew Vasquez
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>
2009-12-04[SCSI] qla2xxx: Add firmware-dump kobject uevent notification.Andrew Vasquez
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>
2009-09-05[SCSI] qla2xxx: Add asynchronous-login support.Andrew Vasquez
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>
2009-06-08[SCSI] qla2xxx: Synchronize MPI settings after a PE Reset.Andrew Vasquez
Ensure MPS remains in synchronization across all NIC/FCoE functions after a reset. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08[SCSI] qla2xxx: Check status of qla2x00_get_fw_version() call.Andrew Vasquez
Unlike earlier ISPs, recent ISPs (ISP81xx) can in fact fail this mailbox command. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08[SCSI] qla2xxx: Export TLV data on supported ISPs.Andrew Vasquez
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>
2009-06-08[SCSI] qla2xxx: Export XGMAC statistics on supported ISPs.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20[SCSI] qla2xxx: Add an override option to specify ISP firmware load semantics.Andrew Vasquez
As it may be useful during debugging to use a specific firmware image. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20[SCSI] qla2xxx: Conditionally disable automatic queue full tracking.Michael Reed
Changing a lun's queue depth (/sys/block/sdX/device/queue_depth) isn't sticky when the device is connected via a QLogic fibre channel adapter. The QLogic qla2xxx fibre channel driver dynamically adjusts a lun's queue depth. If a user has a specific need to limit the number of commands issued to a lun (say a tape drive, or a shared raid where the total commands issued to all luns is limited at the controller level, for example) and writes a limiting value to /sys/block/sdXX/device/queue_depth, the qla2xxx driver will silently and gradually increase the queue depth back to the driver limit of ql2xmaxqdepth. While reducing this value (module parameter) or increasing the interval between ramp ups (ql2xqfullrampup) offers the potential for a work around it would be better to have the option of just disabling the dynamic adjustment of queue depth. This patch implements an "off switch" as a module parameter. Signed-off-by: Michael Reed <mdr@sgi.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20[SCSI] qla2xxx: Add QoS support.Anirban Chakraborty
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>
2009-04-03[SCSI] qla2xxx: Add EDC-update support.Joe Carnuccio
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>