aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_sli.c
AgeCommit message (Collapse)Author
2006-07-09[SCSI] lpfc 8.1.7: Misc FixesJames Smart
Misc Fixes: - Fix some sparse warnings - casts of address space - Fix handling of the adapter registration string. Each invocation was byteswapping, so every other adapter init attempt failed. - Correct comments and default value for the lpfc_max_luns parameter Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09[SCSI] lpfc 8.1.7: Add lpfc_sli_flush_mbox_queue() functionJames Smart
Add lpfc_sli_flush_mbox_queue() function and use it in lpfc_offline() call to avoid deadlock on thread block. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09[SCSI] lpfc 8.1.7: Fix memory leak and cleanup code related to per ring ↵James Smart
lookup array Fix memory leak and cleanup code related to per ring lookup array. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12[SCSI] lpfc 8.1.4 : Introduce lpfc_reset_barrier() function for resets on ↵James Smart
dual channel adapters Introduce lpfc_reset_barrier() function for resets on dual channel adapters Workaround for a hardware errata on dual channel asics. There is a potential for the chip to lock up on a reset if a shared dma engine is in use. The (ugly) work around requires a reset process which uses a mailbox command to synchronize the independent channels prior to the reset to avoid the issue. Unfortunately, the timing windows required to ensure this workaround succeeds are very specific, meaning we can't release the cpu during the barrier. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-06[PATCH] lpfc 8.1.3: Fix polling mode panicJamie Wellnitz
Fix polling mode panic Cause: Race between interrupt driven and polling path in harvesting iocbs from the response ring. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-06[PATCH] lpfc 8.1.3: Fix performance when using multiple SLI ringsJamie Wellnitz
Fix performance when using multiple SLI rings Currently the driver allocates all of its SLI command and response ring entries to one primary ring. Other rings get little, or no, resources. Allow more resources to be given to ring 1 Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28[SCSI] lpfc 8.1.2: Add ERROR and WARM_START modes for diagnostic purposes.Jamie Wellnitz
Add ERROR and WARM_START modes for diagnostic purposes. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28[SCSI] lpfc 8.1.2: Fixed a double insertion of mail box object to the SLI ↵Jamie Wellnitz
mailbox list. Fixed a double insertion of mail box object to the SLI mailbox list. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28[SCSI] lpfc 8.1.2: Explicitly initialize the skip_post argument to ↵Jamie Wellnitz
lpfc_sli_send_reset Explicitly initialize the skip_post argument to lpfc_sli_send_reset on a ERATT interrupt. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28[SCSI] lpfc 8.1.2: Remove unused SLI_IOCB_HIGH_PRIORITYJamie Wellnitz
Remove unused SLI_IOCB_HIGH_PRIORITY Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Add polled-mode supportJames.Smart@Emulex.Com
- Add functionality to run in polled mode only. Includes run time attribute to enable mode. - Enable runtime writable hba settings for coallescing and delay parameters Customers have requested a mode in the driver to run strictly polled. This is generally to support an environment where the server is extremely loaded and is looking to reclaim some cpu cycles from adapter interrupt handling. This patch adds a new "poll" attribute, and the following behavior: if value is 0 (default): The driver uses the normal method for i/o completion. It uses the firmware feature of interrupt coalesing. The firmware allows a minimum number of i/o completions before an interrupt, or a maximum time delay between interrupts. By default, the driver sets these to no delay (disabled) or 1 i/o - meaning coalescing is disabled. Attributes were provided to change the coalescing values, but it was a module-load time only and global across all adapters. This patch allows them to be writable on a per-adapter basis. if value is 1 : Interrupts are left enabled, expecting that the user has tuned the interrupt coalescing values. When this setting is enabled, the driver will attempt to service completed i/o whenever new i/o is submitted to the adapter. If the coalescing values are large, and the i/o generation rate steady, an interrupt will be avoided by servicing completed i/o prior to the coalescing thresholds kicking in. However, if the i/o completion load is high enough or i/o generation slow, the coalescion values will ensure that completed i/o is serviced in a timely fashion. if value is 3 : Turns off FCP i/o interrupts altogether. The coalescing values now have no effect. A new attribute "poll_tmo" (default 10ms) exists to set the polling interval for i/o completion. When this setting is enabled, the driver will attempt to service completed i/o and restart the interval timer whenever new i/o is submitted. This behavior allows for servicing of completed i/o sooner than the interval timer, but ensures that if no i/o is being issued, then the interval timer will kick in to service the outstanding i/o. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-07[PATCH] kfree cleanup: drivers/scsiJesper Juhl
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>
2005-10-29[SCSI] lpfc: Fix eh_ return codes for commandsJames.Smart@Emulex.Com
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>
2005-10-29[SCSI] lpfc: Remove unneeded IOCB_t * castJames.Smart@Emulex.Com
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-29[SCSI] lpfc: Replace lpfc_sli_issue_iocb_wait_high_priorityJames.Smart@Emulex.Com
Replace lpfc_sli_issue_iocb_wait_high_priority with lpfc_sli_issue_iocb_wait. Simplify code paths, as there really wasn't a "priority" Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-29[SCSI] lpfc: Fix for "command completion for iotax x?? not found"James Bottomley
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>
2005-10-29[SCSI] lpfc: Fix for "Unknown IOCB command Data: x0 x3 x0 x0"James.Smart@Emulex.Com
Fix for "Unknown IOCB command Data: x0 x3 x0 x0" messages and inability to see devices On some platforms, the host-memory based ring mgmt area was not zero. Also, driver wasn't manipulating the entire 32bits of the ring pointers. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-12[SCSI] lpfc driver 8.0.30 : convert to use of int_to_scsilun()James.Smart@Emulex.Com
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>
2005-08-12[SCSI] lpfc driver 8.0.30 : fix get_stats panicJames.Smart@Emulex.Com
Fix panic in lpfc_get_stats() Symptoms: Panic on sysfs stats access Cause: In lpfc_get_stats() we are writing to memory that we do not own. Fix: Fix our stats structure allocation. Embed phba->link_stats in struct lpfc_hba and stop treating it like rogue structure. Note: Embedding midlayer/transport structure in our structure caused need for more files to include midlayer/transport headers. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-02[SCSI] lpfc: Update copyright noticesJames.Smart@Emulex.Com
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>
2005-07-02[SCSI] lpfc: Remove $Id$ keyword strings.James.Smart@Emulex.Com
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-02[SCSI] lpfc: Add completion handler to the abort iocbsJames.Smart@Emulex.Com
Add completion handler to the abort iocbs to close a hole where we could reuse an iotag. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-02[SCSI] lpfc: Fix error loading on sparcJames.Smart@Emulex.Com
Bug reported via SourceForge - lpfc does not load on sparc. The lpfc driver must byteswap all FCP IOCBs to recover the data into cpu native format. Also correct issue of "iotag not found" messages Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-02[SCSI] lpfc: Fixes in mbox_timeout_handlerJames.Smart@Emulex.Com
Analysis: Timeout of READ_SPARM64 causes call to lpfc_mbox_timeout_handler which reads psli->mbox_active to determine the timeout mbox. Timeout handler then NULL's psli->mbox_active and calls lpfc_mbx_cmpl_read_sparam(), which on timeout condition, calls link_down(). link_down() now calls disc_done() which calls mbox_timeout_hander() again since WORKER_MBOX_TMO is still set, which goes back to read psli->mbox_active which is already NULL'ed. Remove redundant if statement in lpfc_mbox_timeout_handler. pmbox is assigned psli->mbox_active so there is no need to check if it actually equals psli->mbox_active. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-02[SCSI] lpfc: hgp/pgp cleanupsJames.Smart@Emulex.Com
From: Christoph Hellwig <hch@lst.de>: - rename PGP/HPH to lpfc_pgp/lpfc_hgp - use __le32 types for the members to start fixing sparse -Wbitwise issues - remove lpfc_sli.MBhostaddr, we can always use the pointer from SLI2_DESC directly Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18lpfc: add Emulex FC driver version 8.0.28
From: James.Smart@Emulex.Com Modified for kernel import and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>