aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_isr.c
AgeCommit message (Collapse)Author
2008-10-13[SCSI] qla2xxx: use new host byte transport errors.Mike Christie
This has qla2xxx use the new transport error values instead of DID_BUS_BUSY. I am not sure if all the errors in qla_isr.c I changed are transport related. We end up blocking/deleting the rport for all of them so it is better to use the new transport error since the fc classs will decide when to fail the IO. With this patch if I pull a cable then IO that had reached the driver, will be failed with DID_TRANSPORT_DISRUPTED (not including tape). The fc class will then fail the IO when the fast io fail tmo has fired, and the driver will flush any other commands running. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-03[SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing.Ravi Anand
As the driver is only interested in bits 0-9 of the 1st RSCN-payload word: rsvd[15:14]RscnEventQualifier[13:10]Fmt[9:8]Domain[7:0] Area[15:8]Alpa[7:0] 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>
2008-10-03[SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.Andrew Vasquez
Add additional tightening of residual-count handling (originally from commit 6acf8190025e9c4ea513d4084ff089d476112816) where the driver should discard any lower SCSI-status during firmware/transport residual-count mismatches. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-03[SCSI] qla2xxx: Fix "occured" spelling errors.Bjorn Helgaas
Fix "occured" spelling errors. Most of these are in comments, which I wouldn't normally bother with, but a couple are in printks, which irritate me more. So I just fixed them all at the same time. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-09-13[SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization ↵Andrew Vasquez
completes. Josip Rodin noted (http://article.gmane.org/gmane.linux.ports.sparc/10152) the driver oopsing during registration of an rport to the FC-transport layer with a backtrace indicating a dereferencing of an shost->shost_data equal to NULL. David Miller identified a small window in driver logic where this could happen: > Look at how the driver registers the IRQ handler before the host has > been registered with the SCSI layer. > > That leads to a window of time where the shost hasn't been setup > fully, yet ISRs can come in and trigger DPC thread events, such as > loop resyncs, which expect the transport area to be setup. > > But it won't be setup, because scsi_add_host() hasn't finished yet. > > Note that in Josip's crash log, we don't even see the > > qla_printk(KERN_INFO, ha, "\n" > " QLogic Fibre Channel HBA Driver: %s\n" > " QLogic %s - %s\n" > " ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n", > ... > > message yet. > > Which means that the crash occurs between qla2x00_request_irqs() > and printing that message. Close this window by enabling RISC interrupts after the host has been registered with the SCSI midlayer. Reported-by: Josip Rodin <joy@entuzijast.net> Cc: Stable Tree <stable@kernel.org> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-08-16[SCSI] qla2xxx: Reference proper ha during SBR handling.Andrew Vasquez
The executing-HA of an SRB can be referenced from the sp->fcport. Use this correct value while processing status-continuation data and abort processing. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-08-16[SCSI] qla2xxx: Correct vport-state management issues during ISP-ABORT.Andrew Vasquez
* Use correct 'ha' to mark a device lost from ISR. I/Os will always be returned on the physical-HA. qla2x00_mark_device_lost() should be called with the HA bound to the fcport. * Mark *all* devices lost during ISP-ABORT (bighammer). These fixes correct issues discovered locally where during link-perturbation and heavy vport-I/O fcport/rport states would stray and an rport's scsi-target lost (timed-out). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26[SCSI] qla2xxx: Correct vport management of MBA_PORT_UPDATE.Seokmann Ju
By allowing the qla2x00_alert_all_vps() to manage per-vport recognition of the MBA. 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>
2008-05-30[SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event ↵Seokmann Ju
handling." This reverts commit bd2a1846b2313e32d0270151a31a6b8335384a20. The original (prior to the reverted commit) code was correct. Additionally, the vp_idx should be checked during MBA_PORT_UPDATE in order for proper handling to take place for a given vport. 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>
2008-05-15[SCSI] qla2xxx: Revert "qla2xxx: Validate mid-layer 'underflow' during ↵Andrew Vasquez
check-condition handling." This reverts commit 8084fe168a5252548cdddf2ed181c337fecd0523. The midlayer should be given the oppotunity to interpret the check-condition and based on scsi_cmnd->resid determine if a transfer should be retried or failed. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-05-15[SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers.Andrew Vasquez
Both MSI-X vector handlers attempt to acquire the HA's hardware_lock. This though requires that interrupts be disabled/enabled during acquisition and release of the spinlock. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-27[SCSI] qla2xxx: Re-register FDMI information after a LIP.Andrew Vasquez
Original code would (incorrectly) only re-register after a loop-down condition. Also, FDMI registration should be enabled by default. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla2xxx: Use proper HA during asynchrounous event handling.Seokmann Ju
Changes are added to the driver so that it can behave properly upon having asynchronous events, for example, addition of target devices to the VPs. 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>
2008-04-07[SCSI] qla2xxx: Add ISP84XX support.Harihara Kadayam
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>
2008-04-07[SCSI] qla2xxx: Cruft cleanup of functions and structures.Andrew Vasquez
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>
2008-04-07[SCSI] qla2xxx: Add hardware trace-logging support.Andrew Vasquez
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>
2008-04-07[SCSI] qla2xxx: Add FC-transport Asynchronous Event Notification support.Andrew Vasquez
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>
2008-04-07[SCSI] qla2xxx: Simplify interrupt handler locking.Andrew Vasquez
There's no need to use the heavier (albiet safer) *_irq[save|restore]() locking primitives within the driver's interrupt handlers, interrupts are guaranteed to be non-reentrant. Use lightweight spin_lock() and spin_unlock() primitives while acquiring the hardware_lock. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla2xxx: Update copyright banner.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-03-03[SCSI] qla2xxx: Correct discrepancies during OVERRUN handling on ↵Andrew Vasquez
FWI2-capable cards. For recent ISPs, software must detect OVERRUN conditions by checking the SS_RESIDUAL_OVER bit during CS_COMPLETE handling. Update the driver to perform this check, which is consistent with what earlier firmwares did by explicitly cracking open the FCP_RSP statuses and returning an CS_DATA_OVERRUN. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07[SCSI] qla2xxx: Move RISC-interrupt-register modifications to ↵Andrew Vasquez
qla2x00_request_irqs(). There's no functional change involved with this update, instead it simply migrates the "set cleared interrupt state" codes to a more approprate method, qla2x00_request_irqs(), and cleans-up the driver's probe() logic. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Use completion routines.Marcus Barrow
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>
2008-01-23[SCSI] qla2xxx: Restrict MSI/MSI-X enablement on select ISP2432-type HBAs.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Consolidate duplicate sense-data handling codes.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] qla2xxx: Properly handle Vport state-change-notifications.Shyam Sundar
Drivers do SCRs for each Vport. When something changes in the fabric, firmware generates one interrupt for each RSCN. Based on the current implementation, in each case, we make recursive calls to handle RSCN for physical and each subsequent virtual ports. The fix is to also take into consideration the vp_idx, which is set by the firmware to indicate the vport the RSCN was meant for. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] qla2xxx: Don't explicitly read mbx registers while processing a ↵Andrew Vasquez
system-error. Callers of qla2x00_async_event() already populate the mb[] array upon invocation, doing so via the appropriate mailbox register accessors. The stale codes removed are leftover-bits kept during the FWI2 transition. Though relatively benign, the extra-reads are not valid for FWI2 boards (ISP24xx and above) and peek into the incorrect regions of registers. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-10-23[SCSI] qla2xxx: Correct residual-count handling discrepancies during ↵Andrew Vasquez
UNDERRUN handling. For recent ISPs, software during CS_UNDERRUN handling must determine if the two residuals, firmware-calculated and FCP_RSP, are different to recognize if a frame has been dropped. Update the driver to catch this condition, and clear the SS_RESIDUAL_UNDER and lscsi_status bits. This logic is consistent with what earlier firmwares did by explicitly cracking open the FCP_RSP statuses and clearing SS_RESIDUAL_UNDER. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Rework MSI-X handlers.Andrew Vasquez
Since MSI-X vectors do not require a clearing "handshake" from the system perspective, and the registered handler will not be called more than once for one occurrence of receipt of a vector, there is no requirement to flush the risc register write clearing the interrupt condition in the risc. Also, since the msi-x registered handlers are optimised for a particular vector, it is preferable to handle the one vector received per invocation of the handler. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Query additional RISC information during a pause.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Add PCI error recovery support.Seokmann Ju
Additional cleanups and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-08-15[SCSI] qla2xxx: Correct management-server login-state synchronization issue.Andrew Vasquez
Transitioning link-state via NOS/OLS requires a relogin to a fabric's Management Server. Request relogin when the firmware issues a point-to-point asynchronous event (0x8030). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-23[SCSI] qla2xxx: Data accessors Cleanup of last mergeBoaz Harrosh
- Left overs from last code merges of qla2xxx Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-20[SCSI] qla2xxx: Add ISP25XX support.Andrew Vasquez
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>
2007-07-20[SCSI] qla2xxx: Re-factor isp_operations to static structures.Andrew Vasquez
In preparation for new ISP types. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-20[SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.Shyam Sundar
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-20[SCSI] qla2xxx: Generalize FW-Interface-2 support.Andrew Vasquez
In preparation for new ISP types. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-14[SCSI] qla2xxx: add support for NPIVSeokmann Ju
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>
2007-05-31[SCSI] qla2xxx: convert to use the data buffer accessorsFUJITA Tomonori
- remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24[SCSI] aacraid,qla2xxx: use irq_handler_t where appropriateJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08[SCSI] qla2xxx: Add MSI support.Andrew Vasquez
Supported ISP types include ISP2422 and revision-2 type ISP2432 chips. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-31Merge branch 'linus'James Bottomley
2007-01-31[SCSI] qla2xxx: Remove unnecessary spinlock primitive - mbx_reg_lock.Seokmann Ju
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>
2007-01-31[SCSI] qla2xxx: Enable queue-full throttling when UNDERRUN detected.Andrew Vasquez
As ISP24xx firmware can return a CS_DATA_UNDERRUN completion status when the storage has returned a SAM_STAT_TASK_SET_FULL scsi-status. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-31[SCSI] qla2xxx: Handle IRQ-0 assignments by the system.Andrew Vasquez
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>
2007-01-31[SCSI] qla2xxx: Add MSI-X support.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-13[SCSI] qla2xxx: correct locking while call starget_for_each_device()Seokmann Ju
Removed spin_unlock_irq()/spin_lock_irq() pairs surrounding starget_for_each_device() calls. As Matthew W. pointed out, starget_for_each_device() can be called under a spinlock being held. The change has been tested and verified on qla2xxx.ko module. Thanks Matthew W. and Hisashi H. for help. Signed-off-by: Andrew Vasquez <Andrew.vasquez@qlogic.com> Signed-off-by: Seokmann Ju <Seokmann.ju@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03[SCSI] qla2xxx: Use generic isp_ops.fw_dump() function.Andrew Vasquez
Rather than a direct call, as was done in the case of a RISC-paused state within the ISP24xx interrupt handler. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03[SCSI] qla2xxx: Perform a fw-dump when an ISP23xx RISC-paused state is detected.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03[SCSI] qla2xxx: Detect GPSC capabilities within a fabric.Andrew Vasquez
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>