aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
Commit message (Collapse)AuthorAgeFilesLines
* lpfc 8.3.25: PCI and SR-IOV FixesJames Smart2011-10-031-0/+44
| | | | | | | | | | | | | | | | | | | | | | | commit 0a96e9754d6c4a2a31e50ee6c6e36ec13f80bc25 upstream. PCI and SR-IOV Fixes - Call pci_save_state after the pci_restore_state completes. - After calling pci_enable_pcie_error_reporting() and checking the return value for logging messages from rc, reset rc to 0 to it will not later be interpreted for error. - Read PCI config space SR-IOV capability to get the number of VFs supported. - Check for the PF's supported number of VFs before invoking PCI enable sriov API call and log error message that user requested number of VFs is beyond the PF capability if such request is passed in. - Added check for Physical function with Virtual Functions attached. If so, first disable all the VFs before proceeding to device reset. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lpfc 8.3.25: Fabric and Target Discovery FixesJames Smart2011-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | commit 5248a7498e5f6f3d6d276080466946f82f0ea56a upstream. Fabric and Target Discovery Fixes - Clear FC_VPORT_NEEDS_INIT_VPI flag during completion of REG_VFI mailbox command. - Prevent SLI3 Code from unregistering the physical VPI. - Add an else clause to the code that checks and sets sp->cmn.request_multiple_Nport to clear the bit. - Remove a redundant mbox free. - Modified lpfc_sli4_async_fip_evt to pass in physical VPI toi lpfc_find_vport_by_vpid function. - Modified lpfc_find_vport_by_vpid to translate physical VPI to logical VPI before comparing with vport VPI. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lpfc 8.3.25: Miscellaneous Bug fixes and code cleanupJames Smart2011-10-031-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 88a2cfbb8bf3802ca5a90c7d1567a1e542e6ef0c upstream. Miscellaneous Bug fixes and code cleanup - Fix 16G link speed reporting by adding check for 16G check. - Change the check and enforcement of MAILBOX_EXT_SIZE (2048B) to the check and enforcement of BSG_MBOX_SIZE - sizeof(MAILBOX_t) (3840B). - Instead of waiting for a fixed amount of time after performing firmware reset, the driver shall wait for the Lancer SLIPORT_STATUS register for the readiness of the firmware for bring up. - Add logging to indicate when dynamic parameters are changed. - Add revision and date to the firmware image format. - Use revision instead of rev_name to check firmware image version. - Update temporary offset after memcopy is complete for firmware update. - Consolidated the use of the macros to get rid of duplicated register offset definitions. - Removed the unused second parameter in routine lpfc_bsg_diag_mode_enter() - Enable debugfs when debugfs is enabled. - Update function comments for lpfc_sli4_alloc_xri and lpfc_sli4_init_rpi_hdrs. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SCSI] lpfc 8.3.24: Extend BSG infrastructure and add link diagnosticsJames Smart2011-05-261-0/+8
| | | | | | | | | | | | | | Extend BSG infrastructure and add link diagnostics: - Removed unnecessary copies in handling pass-through mbox cmds. - Add embedded SLI_CONFIG support for BSG. - Add multibuffer support. - Implemented the setting up and tearing down Lancer FC device for performing internal and external loopback diagnostic tests. - Implemented the driver support for performing new link diagnostic tests Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.24: Add resource extent supportJames Smart2011-05-261-42/+85
| | | | | | | | | | This patch adds support for hardware that returns resource ids via extents rather than contiguous ranges. [jejb: checkpatch.pl fixes] Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.24: Add request-firmware supportJames Smart2011-05-261-0/+102
| | | | | | | | | | Add request-firmware support: - Add support for request_firmware interface for INTF2 SLI4 ports. - Add ability to reset SLI4 INTF2 ports. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.24: Add SR-IOV controlJames Smart2011-05-261-2/+142
| | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.24: Extended hardware support and support dump imagesJames Smart2011-05-261-5/+13
| | | | | | | | | | | | Extended hardware support and support dump images: - Make the size to be MAILBOX_SYSFS_MAX (4096) so that it allows the maximum sysfs binary access interface possible. - Add ids and model names for new hardware - Add capability of inducing SLI4 firmware dump obj file Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.24: Miscellaneous Fixes and CorrectionsJames Smart2011-05-261-32/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | Miscellaneous Fixes and Corrections - Remove the memset in the lpfc_sli4_remove_rpi_hdrs call. - Correct swapping of SGE word 2 relative to offset value - Reorganize CQ and EQ usage to comply with SLI4 Specification. - Expand the driver to check the rn bit. Only detect an error if the error bit is set and the RN bit is NOT set. - If mailbox completion code is not success AND the mailbox status is success, then and only then will the driver overwrite the mailbox status. - When driver initializing device, if the device is on a PCIe bus, set PCI's "needs fundamental reset" bit so that EEH uses fundamental reset instead of hot reset for recovery. - Prevent driver from using new WWN when changed in firmware (until driver reload) - When HBA reports maximum SGE size > 0xffffffff (infinite), override with 0x80000000. - Fixed potential missed SLI4 device initialization failure conditions. - Added 100ms delay before driver action following IF_TYPE_2 function reset. - Reverted patch to UNREG/REG on PLOGI to mapped/unmapped node. - Add a check for the CVL received flag in the fcf inuse routine to avoid unregistering the fcf if Devloss fires before Delay discover timer fires. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] lpfc 8.3.23: Fixes related to new hardwareJames Smart2011-05-011-5/+7
| | | | | | | | | | | | | | Fixes related to new hardware - Restrict driver to look at BAR2 or BAR4 only for if_type 0. - Allow SLI4 with FCOE_MODE not set for new SLI4 FC adapters. - Add Temporary RPI field to the ELS request WQE. - Do not override CT field in issue_els_flogi for SLI4 IF type 2 - For RQ_CREATE_V2 mbx cmd: fill in the rqe_size and page_size for RQ_CREATE. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.23: Miscellaneous fixesJames Smart2011-05-011-2/+5
| | | | | | | | | | | | | | | | | | | | Miscellaneous fixes - Do not limit RPI Count to a minimum of 64 - Fix FCFI incorrect on received unsolicited frames. - Save the FCFI returned in the REG_FCFI mailbox command if it was successful. - Fixed Vports not sending FDISC after lips. - Align based on the SLI4_PAGE_SIZE. - Fixed double byte swap on received RRQ. - Fixed mask size for the wq_id mask from 0x7F to 0x7FFF. - Clear FC_FABRIC flag when NPIV LOGO completes (and add a log message). - Modified driver to skip round robin only when ulpStatus==LOCAL_REJECT and word4=SEQUENCE_TIMEOUT to prevent FLOGI to disconnected FCF. - Don't add rport if driver unloading Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-311-10/+10
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* [SCSI] lpfc 8.3.22: Update Copyright DatesJames Smart2011-03-231-1/+1
| | | | | | | | Update Copyright Dates Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.22: Add support for PCI Adapter FailureJames Smart2011-03-231-12/+26
| | | | | | | | | | Periodically poll adapter registers to detect pci adapter failure (reads return -1). On failure, take port offline, set error indicators and wake up worker threads. Threads will take adapter offline. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.22: T10-DIF correctionsJames Smart2011-03-231-0/+1
| | | | | | | | | | T10-DIF corrections - Add selective reset jump table entry - Split T10-DIF BDEs that cross 4K boundary Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Initialization and user interface changesJames Smart2011-02-181-1/+1
| | | | | | | | | | | | - Make link speed not supported by port message an error message. - Add support for new SLI failure codes add sysfs parameter to reflect the security setting and current state. - Add all lpfc module parameters to the /sys/modules/lpfc/parameters directory. [jejb: fix up compile failure] Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: FC Discovery changesJames Smart2011-02-181-0/+6
| | | | | | | | | | | | | | FC Discovery changes - Treat received PLOGI while logged in as a relogin (unregister and reregister). - Added a timer to delay Nport discovery when clean bit is cleared and Fabric portname/nodename/FCID is changed. - Invalidate Port's DID when receiving PLOGI from p2p port with CONFIG_PORT mailbox command. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: RRQ Implementation fixesJames Smart2011-02-181-6/+7
| | | | | | | | | | | | | | | | | | | | | | | RRQ Implementation fixes - Added checks to prevent a call to findnode_did in clr_active_rrq - Added the del_sync_timer call for the rrq_tmr to the stop_hba_timers routine. - Added a check in __lpfc_set_active_rrq for the driver unloading to prevent adding an rrq when the driver is being removed. - Add code to scsi_iocb_cmpl to check for the remote stop and add the rrq. - Added the same check to els retry. - Added code to compare the source did in the els rrq to the vports did and chose the right exchange ID. - Initialize the start_cmd pointer to indicate when we have looped through all of the scsi buffers. - Remove the need for the lock around the clearing of the active bit in the rrq. - Added code to clean the els and fcp xri aborted list and remove the all of the RRQs for a deleted vport. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Critical Errors and Bug FixesJames Smart2011-02-181-26/+87
| | | | | | | | | | | | | | | | | | | Critical Errors: - Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM - Save the irq level when locking the host_lock in lpfc_findnode_did Bug Fixes: - Adjust payload_length and request_length for sli4_config mailbox commands. - Add the freed sgl/XRI to the tail of the list rather than to the head. - Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before issuing a fdisc on an els retry. - Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up is LPFC_INITIALIZE_LINK. - Add support for SLI-4 Performance Hints Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * drivers: fix comment typo diable -> disable.Justin P. Mattock2011-01-031-1/+1
| | | | | | | | | | | | | | | | The below patch fixes a typo "diable" to "disable" and also fixes another typo in a comment. Please let me know if this is correct or not. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | [SCSI] lpfc 8.3.20: Implement new SLI4 init procedures based on if_typeJames Smart2010-12-211-225/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement new SLI4 init procedures based on if_type: - Add structure changes for new SLIPORT registers and BAR changes. - Update register names to be consistent with inteface spec terms. - Added union to encapsulate Hardward error registers. - Rework lpfc_sli4_post_status_check() around SLI-4's SLI_INTF type - Removed the lpfc_sli4_fw_cfg_check routine - Segmented driver logic to include evaluation of the if_type to engage different behaviors. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] lpfc 8.3.20: Implement the FC and SLI async event handlersJames Smart2010-12-211-35/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the FC and SLI async event handlers: - Updated MQ_CREATE_EXT mailbox structure to include fc and SLI async events. - Added the SLI trailer code. - Split physical field into type and number to reflect latest SLI spec. - Changed lpfc_acqe_fcoe to lpfc_acqe_fip to reflect latest Spec changes. - Added lpfc_acqe_fc_la structure for FC link attention async events. - Added lpfc_acqe_sli structure for sli async events. - Added lpfc_sli4_async_fc_evt routine to handle fc la async events. - Added lpfc_sli4_async_sli routine to handle sli async events. - Moved LPFC_TRAILER_CODE_FC to be handled by its own handler function. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] lpfc 8.3.19: Added support for ELS RRQ commandJames Smart2010-12-211-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for ELS RRQ command - Add new routine lpfc_set_rrq_active() to track XRI qualifier state. - Add new module parameter lpfc_enable_rrq to control RRQ operation. - Add logic to ELS RRQ completion handler and xri qualifier timeout to clear XRI qualifier state. - Use OX_ID from XRI_ABORTED_CQE for RRQ payload. - Tie abort and XRI_ABORTED_CQE andler to RRQ generation. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] lpfc 8.3.19: Add SLI4 FC Discovery supportJames Smart2010-12-211-60/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SLI4 FC Discovery support - Replace READ_LA and READ_LA64 with READ_TOPOLOGY mailbox command. - Converted the old READ_LA structure to use bf_set/get instead of bit fields. - Rename HBA_FCOE_SUPPORT flag to HBA_FCOE_MODE. Flag now indicates function is running as SLI-4 FC or FCoE port. Make sure flag reset each time READ_REV completed as it can dynamically change. - Removed BDE union in the READ_TOPOLOGY mailbox command and added a define to define the ALPA MAP SIZE. Added FC Code for async events. - Added code to support new 16G link speed. - Define new set of values to keep track of valid user settable link speeds. - Used new link speed definitions to define link speed max and bitmap. - Redefined FDMI Port sppeds to be hax values and added the 16G value. - Added new CQE trailer code for FC Events. - Add lpfc_issue_init_vfi and lpfc_init_vfi_cmpl routines. - Replace many calls to the initial_flogi routine with lpfc_issue_init_vfi. - Add vp and vpi fields to the INIT_VFI mailbox command. - Addapt lpfc_hba_init_link routine for SLI4 use. - Use lpfc_hba_init_link call from lpfc_sli4_hba_setup. - Add a check for FC mode to register the FCFI before init link. - Convert lpfc_sli4_init_vpi to be called without a vpi (get it from vport). Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] lpfc 8.3.19: Add latest SLI4 Hardware initialization supportJames Smart2010-12-211-10/+38
| | | | | | | | | | | | | | | | | | | | - Add the Lancer FC and FCoE PCI IDs - Add new SLI4 INTF register definitions - Implement new SLI4 doorbell register Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] lpfc 8.3.19: Fix critical errors and crashesJames Smart2010-12-211-2/+4
|/ | | | | | | | | | | | | | | | | | | Fix critical errors and crashes - Replace LOF_SECURITY with LOG_SECURITY - When calculating diag test memory size, use full size with header. - Return LS_RJT with status=UNSUPPORTED on unrecognized ELS's - Correct NULL pointer dereference when lpfc_create_vport_work_array() returns NULL. - Added code to handle CVL when port is in LPFC_VPORT_FAILED state. - In lpfc_do_scr_ns_plogi, check the nodelist for FDMI_DID and reuse the resource. - Check for generic request 64 and calculate the sgl offset for the request and reply sgls, also calculate the xmit length using only the request bde. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.18: Adapter Shutdown and Unregistration cleanupJames Smart2010-10-261-0/+52
| | | | | | | | | | | | | | | | | Adapter Shutdown and Unregistration cleanup - Correct the logic around hba shutdown. Prior to final reset, the driver must wait for all XRIs to return from the adapter. Added logic to poll, progressively slowing the poll rate as delay gets longer. - Correct behavior around the rsvd1 field in UNREG_RPI_ALL mailbox completion and final rpi cleanup. - Updated logic to move pending VPI registrations to their completion in cases where a CVL may be received while registration in progress. - Added unreg all rpi mailbox command before unreg vpi. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.18: Add logic to detect last devloss timeoutJames Smart2010-10-261-23/+18
| | | | | | | | | | | | | | | | | | Added driver logic to detect the last devloss timeout of remote nodes which was still in use of FCF. At that point, the driver should set the last in-use remote node devloss timeout flag if it was not already set and should perform proper action on the in-use FCF and recover of FCF from firmware, depending on the state the driver's FIP engine is in. Find eligible FCF through FCF table rescan or the next new FCF event when FCF table rescan turned out empty eligible FCF, and the successful flogi into an FCF shall clear the HBA_DEVLOSS_TMO flag, indicating the successful recovery from devloss timeout. [jejb: add delay.h include to lpfc_hbadisc.c to fix ppc compile] Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.18: FC/FCoE Discovery fixesJames Smart2010-10-251-4/+5
| | | | | | | | | | | | | | | | | | | | | FC/FCoE Discovery fixes: - Call the lpfc_drain_txq only for SLI4 hba - In lpfc_cmpl_els_fdisc, fix code path that does not free IOCB. - Treated firmware matching FCF property with different index as error - Propagate error returns from lpfc_issue_els_flogi() - Refactored lpfc_unregister_unused_fcf() to create a post lpfc_dev_loss_tmo handler call for SLI-4 devices. Allows checking of fcf after last ndlp released so that fcf can be released if no longer in use. - Replaced individual FCF_XXXX_DISC flag clearing in lieu of aggregate FCF_DISCOVERY flag upon succesful completion of flogi. - Correct setting of altBbCredit value in sparams to correct issue with logins with remote loop-based devices. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.17: Replace function reset methodologyJames Smart2010-10-071-123/+9
| | | | | | | | Replace graceful teardown steps with the singular function reset command. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.17: SLI Additions and FixesJames Smart2010-10-071-21/+24
| | | | | | | | | | | | | | | | - Added driver support for management application to pass down two security specific mailbox commands (MBX_SECURITY_MGMT and MBX_AUTH_PORT) - Added driver support for handling FIPS zeroization trap of host ERATT ER8, performing selective reset and bringing the device up. - Added code to detect INIT_LINK mailbox command completion returning status MBXERR_SEC_NO_PERMISSION. - Increased the wait timeout on host status register HS_FFRDY and HS_MBRDY being set. - Remove the port offline code from the Heartbeat TMO handler. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.17: Code Cleanup and Locking fixesJames Smart2010-10-071-17/+17
| | | | | | | | | | | | - Move Unload flag earlier in vport deletei to stop ELS traffic - Replaced some unnecessary spin_lock_irqsave with spin_lock_irq - Fixed circular spinlock dependency between low-level driver and SCSI midlayer - Remove duplicate code from lpfc_els_retry routine - Make all error values negative Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc: prep for fc host dev loss tmo supportMike Christie2010-10-071-0/+2
| | | | | | | | | | | | | This removes the driver's get_host_def_dev_loss_tmo callback and just has the driver set the dev loss using the fc class fc_host_dev_loss_tmo macro like is done for other fc params. It also adds compat support for the driver's existing dev loss and nodev sysfs and modparams. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.16: FCoE Discovery and Failover FixesJames Smart2010-08-061-30/+49
| | | | | | | | | | | | | | | | | | | - Add support for re-reg'ing changed VPI w/o unregister VPI - Copy WWN and state from old nodelist when target DID change. - Clean up old nodelist rport and put the nodelist when target DID change. - Clear the VFI_REGISTERED flag when UNREG_VFI completes. - Made both checks of port_state against LPFC_FLOGI and LPFC_FDISC non-inclusive for ignoring CVL events. - Added logic to stop retrying of the ongoing PLOGI and FDISC if transitioned back to the FCF rediscovery state in reaction to CVL. - Removed the dependency of scanning of all the available FCF table entries for bulding round-robin bitmap. - Use the lpfc_sli4_fcf_rr_read_fcf_rec() in responding to individual New FCF found event. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.16: SLI Additions, updates, and code cleanupJames Smart2010-08-061-17/+36
| | | | | | | | | | | | | | | | - Remove unneeded Endian swap for Block Guard IOCB response - Add a check for mailbox active before issuing the heartbeat command - Correct heartbeat last_completion updates to avoid unneeded heartbeats - Add Security crypto support to CONFIG_PORT mailbox command - Add fips level and fips spec revision sysfs parameters - Remove duplicate setting of ext_byte_len fields in lpfc_bsg_issue_mbox - Switch call to memcpy_toio to __write32_copy to prevent unaligned 64 bit copy - Change log message 0318 from an error to a warning as it is not an error - Patch an incorrect call to lpfc_drain_txq on SLI-3 functions Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.15: FCoE Related FixesJames Smart2010-07-281-12/+10
| | | | | | | | | | | | | | | FCoE Related Fixes - Correct find-next-FCF routine so that it searches at next FCF rather than current one. - Enhanced round-robin FCF failover algorithm to re-start on "New FCF" async event - Update the manner in which we look at FCFs while they may be in their discovery state. - Use LPFC_FCOE_NULL_VID macro when checkinf for valid vlan_id for FCF Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.14: SCSI and SLI API fixesJames Smart2010-07-271-0/+1
| | | | | | | | | | | | | | - Fixed accounting of allocated SCSI buffers when post sgl fails. - Restrict scsi buffer allocation based on LUN count (sdev_cnt). - Create __lpfc_sli_free_rpi that doesn't take out the hbalock. - Modify lpfc_sli_free_rpi to call __lpfc_sli_free_rpi. - Call __lpfc_sli_free_rpi in lpfc_cleanup_pending_mbox. - Do not swap the strings returned in mailbox commands and do not swap byte aligned data in VPD. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.14: PCI fixes and enhancementsJames Smart2010-07-271-13/+182
| | | | | | | | | | | | - Allow enabling MSI-X intterupts with fewer vectors than requested by looking at the return value from pci_enable_msix. - Implemented driver PCI AER error handling routines for supporting AER error recovering on SLI4 devices. - Remove redundant SLI_ACTIVE checks Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.James Smart2010-07-271-2/+6
| | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.13: Misc fixesJames Smart2010-07-271-0/+6
| | | | | | | | | | | - Change the Max receive size on CIN FCFs to 0x800 - (From linux community) Check boundary before checking for NULL. - Update last completion time for completed I/O to prevent heartbeat. - Add Balius PCI Device IDs Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.13: SCSI specific changesJames Smart2010-07-271-2/+5
| | | | | | | | | | - Fix hba_queue_depth to reflect actual available XRIs - Add support for new SLER specific firmware status codes. - Free SCSI buffer when iotag allocation fails. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.13: Initialization code clean up and fixes.James Smart2010-07-271-5/+35
| | | | | | | | | | | - Add poll or wait flag parameter to hba_init_link and hba_down_link. - (From Linux Community) Make return with ENXIO negative. - Remove unused INB code from driver. - Prevent block_magmt_io from returning until mailbox is inactive. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.12: Fix discovery issuesJames Smart2010-04-111-3/+17
| | | | | | | | | | - Add code to prevent unreg_vpi mailbox command from failing. - Add code to reset the HBA if unreg_vpi mailbox fails with busy status. - Remove code that was clearing the nlp_type stored during rport discovery. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.12: Critical fixesJames Smart2010-04-111-9/+7
| | | | | | | | | | | | - Move the code to increase the sg seg count for LP21000 adapters. - Check pcmd on command completion before dereferencing it. - Clear queue memory when creating firmware queues to prevent stale entries. - Replace the use of PAGE_SIZE in many areas that assumed it was always 4k. - Add an else clause to a conditional that needed to unlock the hba_lock. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.12: Emulex SLI enhancementsJames Smart2010-04-111-0/+30
| | | | | | | | | - Add the new Logical Link speed event support. - Add RATOV and EDTOV to the REG_VFI mailbox command. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.11: Fix AER uncorrectable non-fatal error handlingJames Smart2010-04-111-23/+27
| | | | | | | | | Only abort outstanding I/O to force the OS to retry failed I/Os for AER uncorrectable non-fatal errors instead of reseting the adapter. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.11: Driver management improvements via BSGJames Smart2010-04-111-0/+2
| | | | | | | | | - Add BSG support for PCI loopback testing. - Add BSG support for extended mailbox commands. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.11: SLI4 ImprovementsJames Smart2010-04-111-38/+38
| | | | | | | | | - Correct all SLI4 code to work on big endian systems. - Move read of sli4 params earlier so returned values are used correctly. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.11: FCF failover improvementsJames Smart2010-04-111-5/+14
| | | | | | | | | | | | FCF failover improvements - Add random FCF failover when there are multiple FCFs available. - Prevent FCF log messages from being displayed for FC adapters. - Separate the New FCF and Modified FCF log messages. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>