summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] lpfc: bug fixesJames Smart2007-06-171-92/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | Following the NPIV support, the following changes have been accumulated in the testing and qualification of the driver: - Fix affinity of ELS ring to slow/deferred event processing - Fix Ring attention masks - Defer dev_loss_tmo timeout handling to worker thread - Consolidate link down error classification for better error checking - Remove unused/deprecated nlp_initiator_tmr timer - Fix for async scan - move adapter init code back into pci_probe_one context. Fix async scan interfaces. - Expand validation of ability to create vports - Extract VPI resource cnt from firmware - Tuning of Login/Reject policies to better deal with overwhelmned targets - Misc ELS and discovery fixes - Export the npiv_enable attribute to sysfs - Mailbox handling fix - Add debugfs support - A few other small misc fixes: - wrong return values, double-frees, bad locking - Added adapter failure heartbeat Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: NPIV: add NPIV support on top of SLI-3James Smart2007-06-171-366/+1295
| | | | | | | | | | | NPIV support is added to the driver. It utilizes the interfaces of the fc transport for the creation and deletion of vports. Within the driver, a new Scsi_Host is created for each NPIV instance, and is paired with a new instance of a FC port. This allows N FC Port elements to share a single Adapter. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: NPIV: add SLI-3 interfaceJames Smart2007-06-171-127/+146
| | | | | | | | | | | | | NPIV support is only available via new adapter interface extensions, termed SLI-3. This interface changes some of the basic behaviors such as command and response ring element sizes and data structures, as well as a change in buffer posting. Note: the new firmware extensions are found only on our mid-range and enterprise 4Gig adapters - so NPIV support is available only on these newer adapters. The latest firmware can be downloaded from the Emulex support page. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: NPIV: split portsJames Smart2007-06-171-715/+716
| | | | | | | | | | | | | The driver is reorganized to separate the handling of the adapter from the handling of the FC port. Adapter handling includes submissions of command requests, receiving responses, and managing adapter resources. The FC port includes the discovery engine, login handling, and the mapping of a Scsi_Host on the "port". Although not a large functional change, as it touches core structures and functions, resulting in a large text delta. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Update copyright year to 2007James Smart2007-05-061-1/+1
| | | | | | | Update copyright year to 2007 Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Collapse discovery lists to a single node listJames Smart2007-05-061-83/+72
| | | | | | | Collapse discovery lists to a single node list. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Reference count node structures for node lifetime ↵James Smart2007-05-061-48/+59
| | | | | | | | | management Reference count node structures for node lifetime management. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Improve handling of failed ELS abortsJames Smart2007-05-061-0/+1
| | | | | | | Improve handling of failed ELS aborts. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Improve diagnostic messages and change local loopback ↵James Smart2007-05-061-34/+32
| | | | | | | | | message to KERN_INFO Improve diagnostic messages and change local loopback message to KERN_INFO Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Round 2 of Miscellaneous fixesJames Smart2007-05-061-4/+8
| | | | | | | | | | | | | | | | | | | | | Round 2 of Miscellaneous fixes: - Ensure we don't prematurely re-enable IRQs in lpfc_sli_abort_fcp_cmpl(). - Prevent freeing of iocb after IOCB_TIMEDOUT error. - Added code to cleanup REG_LOGIN mailbox command when a LOGO is received. - Fix offline window where more work can sneak in after clearing work_ha - Use target reset instead of LU reset in bus_device_reset_handler - Fixed system hangs due to leaked host_lock. - Fixed NULL pointer dereference during I/O with LIP. - Fixed false iocb timeout. - Fixed name server query response handling. - Change rport dev_loss_tmo value when user change lpfc HBA's dev_loss_tmo. - Fixed a memory leak in lpfc_sli_wake_mbox_wait. - Fixed check for dropped frames. - Removed hba queue depth calculation based on device PCI IDs - Change min cr_count value specified in comment to agree with setting Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Reorganize lpfc_nlp_list() and callers to prepare for ↵James Smart2007-05-061-70/+46
| | | | | | | | | nodelist simplification Reorganize lpfc_nlp_list() and callers to prepare for nodelist simplification. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Fix unlock inside list traversalJames Smart2007-05-061-13/+17
| | | | | | | Fix unlock inside list traversal. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Modify ELS abort handling to prevent double completionJames Smart2007-05-061-60/+4
| | | | | | | | | | | | | | Modify ELS abort handling to prevent double completion Rework portions of ELS abort handling to prevent double completion - Rework ELS iotags and correct abort routine - Move the (badly wrong) ELS completion logic from the initial ELS abort request function to the ELS completion function. - Fixup the iocb completion handling to account for the ELS abort completions. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.12 : Misc bug fixes and code cleanupJames Smart2007-05-061-9/+8
| | | | | | | | | | | | | | | | | | | | | Misc bug fixes and code cleanup: - Fix system hang while running on systems with IOMMU - Fix use after free issues with rports - Don't free mailbox structure if it's still on the mboxq list - Decrement txq_cnt rather than txcmplq_cnt when parsing the txq list - Use msleep for long delays to prevent soft lockup bug check - Don't remove node during dev_loss_tmo if discovery is active - Fix memory leaks in get/reset statistics and link attention paths - Fixed lpfc_ns_rsp to handle entire GID_FT response. - mbox interface should use MAILBOX_CMD_SIZE rather than sizeof(MAILBOX_t) - Fixed bug check in add_timer. - Fixup messages 0116, 0117, and 0128 to report ELS I/O tag. - Remove unused parameter to lpfc_cleanup. - Change mailbox timeout handling. - Remove unused buflist. Code cleanup. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.11 : Fix Memory leaksJames Smart2006-12-031-3/+18
| | | | | | | Fix Memory leaks associated with mbox cmds READ_LA, READ_SPARAM, REG_LOGIN Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_supportJames Smart2006-12-031-3/+3
| | | | | | | | It was not accounted for in the fast/slow rings. Genericize the implementation and control it via sysfs Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.11 : Discovery FixesJames Smart2006-12-031-0/+7
| | | | | | | | | | | | Discovery Fixes: - Prevent starting discovery of a node if discovery is in progress. - Code improvement (reduction) for lpfc_findnode_did(). - Update discovery to send RFF to Fabric on link up - Bypass unique WWN checks for fabric addresses - Add ndlp to plogi list prior to issuing the plogi els command Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.10 : Add support to post events via new FC event interfacesJames Smart2006-09-021-0/+5
| | | | | | | Add support to post events via new FC event interfaces Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.9 : Misc Bug FixesJames Smart2006-08-191-3/+12
| | | | | | | | | | | | Misc Bug Fixes: - Cap MBX_DOWN_LINK command timeout to 60 seconds - Fix double free of ndlp object - Don't free mbox structures on error. The completion handlers expect to do so. - Clear host attention work items when going offline - Fixed discovery issues in multi-initiator environments. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.7 : ID String and Message fixesJames Smart2006-08-061-3/+3
| | | | | | | | | | ID String and Message fixes - Fix switch symbolic name registration to match cross-OS values - Replace printk's with more standard lpfc_printf_log calls - Make all lpfc_printf_log message numbers unique Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.7: Correct bogus nodev_tmo message on NPort that changes its ↵James Smart2006-07-091-24/+34
| | | | | | | | | NPort Id Correct bogus nodev_tmo message on NPort that changes its NPort Id Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.7: Use mod_timer instead of add_timer in ↵James Smart2006-07-091-4/+3
| | | | | | | | | | | | | lpfc_els_timeout_handler Use mod_timer instead of add_timer in lpfc_els_timeout_handler This patch was formerly posted by Mark Haverkamp. http://marc.theaimsgroup.com/?l=linux-scsi&m=114246089015681&w=2 Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: sparse NULL warningsRandy Dunlap2006-06-261-3/+3
| | | | | | | | | | | | | | | | From: Randy Dunlap <rdunlap@xenotime.net> Fix sparse warnings: use NULL instead of 0 for pointers: drivers/scsi/lpfc/lpfc_els.c:827:56: warning: Using plain integer as NULL pointer drivers/scsi/lpfc/lpfc_els.c:2781:18: warning: Using plain integer as NULL pointer drivers/scsi/lpfc/lpfc_els.c:2782:18: warning: Using plain integer as NULL pointer drivers/scsi/lpfc/lpfc_init.c:951:21: warning: Using plain integer as NULL pointer drivers/scsi/lpfc/lpfc_init.c:956:20: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.5 : Misc small fixesJames Smart2006-04-191-1/+1
| | | | | | | | | | | Contains the following misc fixes: - Fix build warnings - Race condition in lpfc_workq_post_event() could corrupt phba->work_list. - nlp_sid was not being initialized properly - Fix some RSCN handling during the re-discovery after Link Up event. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.5 : Additional fixes to LOGO, PLOGI, and RSCN processingJames Smart2006-04-191-33/+35
| | | | | | | Additional fixes to LOGO, PLOGI, and RSCN processing Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.5 : Fixed FC protocol violation in handling of PRLO.James Smart2006-04-191-0/+18
| | | | | | | Fixed FC protocol violation in handling of PRLO. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.5 : Use asynchronous ABTS completion to speed up abort ↵James Smart2006-04-191-7/+0
| | | | | | | | | completions Use asynchronous ABTS completion to speed up abort completions Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.4 : Fixed a timer panic due to timer firing after freeing ndlpJames Smart2006-03-121-0/+6
| | | | | | | Fixed a timer panic due to timer firing after freeing ndlp Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.4 : Fixed RSCN handling when a PLOGI is in retryJames Smart2006-03-121-9/+42
| | | | | | | Fixed RSCN handling when a PLOGI is in retry. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.4 : Fix Discovery processing for NPorts that change their ↵James Smart2006-03-121-76/+131
| | | | | | | | | | NPortId on the fly Fix Discovery processing for NPorts that change their NPortId on the fly due to a cable swap. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] lpfc 8.1.3: Protect NPL lists with host lockJamie Wellnitz2006-03-061-1/+2
| | | | | | | | | | | | Protect NPL lists with host lock Symptoms: lpfc_findnode_rpi and lpfc_findnode_did can be called outside of the discovery thread context. We have to iterate through the NPL lists under the host lock and all add/del operations on those lists have to be done under host lock. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Code style changes for Discovery codeJamie Wellnitz2006-02-281-24/+16
| | | | | | | Code style changes for Discovery code Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Make lpfc_els_rsp_rps_acc and lpfc_els_rsp_rpl_acc staticJamie Wellnitz2006-02-281-2/+2
| | | | | | | Make lpfc_els_rsp_rps_acc and lpfc_els_rsp_rpl_acc static Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Added support for FANJamie Wellnitz2006-02-281-32/+91
| | | | | | | Added support for FAN Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Misc FC Discovery changes :Jamie Wellnitz2006-02-281-186/+144
| | | | | | | | | | | | | | | | Misc FC Discovery changes : - Added FC_BYPASSED_MODE statistic - Corrected some log message data - Fix up Discovery infrastructure to support FAN: Allow Fabric entities to flow thru DSM Fix up linkup/linkdown unregister login processing for Fabric entities Clean up Discovery code Utilize nodev_tmo for Fabric entities - Use of 3 * ratov for CT handling timeouts - Fix up DSM to make more appropriate decisions and clean up code. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Fixed a race condition in the PLOGI retry logic.Jamie Wellnitz2006-02-281-12/+16
| | | | | | | Fixed a race condition in the PLOGI retry logic. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.2: Handling of ELS commands RRQ, RPS, RPL and LIRR correctlyJamie Wellnitz2006-02-281-26/+248
| | | | | | | Handling of ELS commands RRQ, RPS, RPL and LIRR correctly Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc 8.1.1 : Fixes for short cable pullsJames.Smart@Emulex.Com2005-12-131-0/+4
| | | | | | | | | | Cause: Link bounces were causing discovery ELS's to be killed. Driver was not properly flushing ELS commands upon the subsequent link bounces. Thus, processing of ELS post link bounce erroneously assumed discovery failure and device loss. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] kfree cleanup: drivers/scsiJesper Juhl2005-11-071-6/+3
| | | | | | | | | | | | This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SCSI] lpfc: Fix eh_ return codes for commandsJames.Smart@Emulex.Com2005-10-291-4/+2
| | | | | | | | | | | Return FAILED from eh_ routines if command(s) is(are) not completed There were scenarios where we may have returned from the error handlers prior to all affected commands being flushed to the midlayer. Add changes to ensure this doesn't happen. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: Fix for "command completion for iotax x?? not found"James Bottomley2005-10-291-14/+16
| | | | | | | | | | | | | From: James Smart <James.Smart@emulex.com> There were scenarios where the error handlers could reuse an iotag value of an active io. Remove all possibility of this by pre-assigning iotag resources to command resources. Signed-off-by: James Smart <James.Smart@emulex.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc driver 8.0.30 : convert to use of int_to_scsilun()James.Smart@Emulex.Com2005-08-121-0/+1
| | | | | | | | | | | | | | Replace use of lpfc_put_lun with midlayer's int_to_scsilun Remove driver's local definition of lpfc_put_lun (which converts an int back to a 64-bit LUN) and replace it's use with the recently added int_to_scsilun function provided by the midlayer. Note: Embedding midlayer structure in our structure caused need for more files to include midlayer headers. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: Update copyright noticesJames.Smart@Emulex.Com2005-07-021-13/+14
| | | | | | | | | | | Update copyright notice text and include year 2005. Add Copyright notice for Christoph Hellwig to several files: lpfc.h lpfc_attr.c lpfc_els.c lpfc_hbadisc.c lpfc_init.c lpfc_mbox.c lpfc_mem.c lpfc_nportdisc.c lpfc_scsi.c lpfc_sli.c Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: Remove $Id$ keyword strings.James.Smart@Emulex.Com2005-07-021-4/+0
| | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] lpfc: Fix LS_RJT never sent by lpfc_els_unsol_event()James.Smart@Emulex.Com2005-07-021-8/+8
| | | | | | | | | | | lpfc_els_unsol_event() checks rjt_err to determine is LS_RJT should be sent. However, rjt_err was set to LSEXP_NOTHING_ELSE (which is 0) in cases where an LS_RJT should be sent, so rjt_err was never true. Change lpfc_els_unsol_event() to set rjt_err to 1 when LS_RJT should be sent. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* lpfc: add Emulex FC driver version 8.0.282005-04-181-0/+3258
From: James.Smart@Emulex.Com Modified for kernel import and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
OpenPOWER on IntegriCloud