aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_isr.c
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] qla4xxx: Complete the cmd if sense_len is zeroPrasanna Mumbai2011-05-241-2/+7
| | | | | | | | | | | | Complete the cmd if sense length is zero. For cases where sense data spans across multiple iocb's by FW, we need to hold on to the I/O (ha->status_srb != NULL) till we have processed them all and copied the sense data from internal buffer to scsi_cmd sense buffer. Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] qla4xxx: update function qla4xxx_isr_decode_mailbox()Prasanna Mumbai2011-05-241-5/+8
| | | | | | | | | | | - Added MBOX_ASTS_DUPLICATE_IP AEN handling. - Update MBOX_AEN_REG_COUNT to 8 so that driver will save status of all mbox registers in aen_q Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <jbottomley@parallels.com>
* [SCSI] qla4xxx: Prevent other port reinitialization during remove_adapterKaren Higgins2011-03-231-1/+1
| | | | | | | | | | | | | remove ha flag AF_HBA_GOING_AWAY and added flag AF_HA_REMOVAL to mark the other ISP-4xxx port to indicate that the driver is being removed, so that the other port will not re-initialize while in the process of removing the ha due to driver unload or hba hotplug. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: cleanup DDB relogin logic during initializationKaren Higgins2011-03-231-27/+2
| | | | | | | | | | | | | Driver has capability to add device dynamically and present them to OS, driver no longer need to wait for DDBs to come online during driver initialization. Driver still issues a relogin for DDBs that are not online, but no longer wait for DDB to come online. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* drivers:scsi Change printk typo initate -> initiateJustin P. Mattock2011-02-171-1/+1
| | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* [SCSI] qla4xxx: Updated the Copyright headerVikas Chaudhary2010-12-211-1/+1
| | | | | | Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: cache new IP address acquired via DHCPPrasanna Mumbai2010-12-211-1/+2
| | | | | | | | | | | Prior to firmware state change from ACQUIRING to READY, an 0x8029 AEN is received. Added code to check previous state being ACQUIRING in order to update the ip address in the driver. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: initialize MSI in correct wayShyam Sundar2010-12-211-1/+1
| | | | | | | | | | IRQF_SHARED flag should not be set when calling request_irq for MSI since this interrupt mechanism cannot be shared like standard INTx Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Drop use of IRQF_DISABLEVikas Chaudhary2010-12-211-2/+2
| | | | | | | | IRQF_DISABLE flag is deprecated and this flag is a NOOP in kernel. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: dump mailbox registers on System ErrorKaren Higgins2010-10-251-0/+2
| | | | | | | | Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Add support for 8130/8131 AENs.Shyam Sundar2010-10-251-0/+12
| | | | | | | | | | | | AEN 8130 Corresponds to an event representing the insertion (detection) of a transceiver. It also reports the type of the SFP+. AEN 8131 corresponds to the removal of a transceiver. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: correct data type of sense_len in qla4xxx_status_cont_entryVikas Chaudhary2010-10-251-1/+1
| | | | | | | | | change data type of sense_len from uint8_t to uint16_t Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Added AER support for ISP82xxLalit Chandivade2010-08-061-0/+3
| | | | | | | | | | | Added support for PCI error handling Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: replace all dev_info, dev_warn, dev_err with ql4_printkVikas Chaudhary2010-07-281-4/+4
| | | | | | | Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Added support for ISP82XXVikas Chaudhary2010-07-281-63/+325
| | | | | | | Signed-off-by: Vikas Chaudhary <Vikas Chaudhary@qlogic.com> Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: added support for abort task management commandVikas Chaudhary2010-05-021-3/+3
| | | | | | | | | | | * Handles SCSI command aborts. * Serialization srb between error handler and command completion path. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: do not retry login to CHAP auth failed targetsVikas Chaudhary2010-05-021-1/+1
| | | | | | | | | | | | Per RFC 3720, Login Response Status Code 0x02 should not be retried. Condensed connection error checking code to a single routine, and added check for status class 0x02. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: set device state as per Link UP and LINK DOWNVikas Chaudhary2010-05-021-4/+11
| | | | | | | | | | | | | | | | | | | | | Link Down -> Mark all devices missing Previously, the driver took no action on a Link Down, and waited for the I/O on a dead connection to timeout in the firmware before marking the DDB missing. Link Up -> Mark all devices online F/W will do auto login to all the devices only once. After that its the responsibility of the driver to relogin to devices whenever there is : * Any sort of connection failure or * KATO expires indicating target has logged out or * I/O times out etc. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Removed residual from overrun debug printMike Christie2009-09-051-4/+4
| | | | | | | | | | The residual variable is only valid for udnerrun so do not print it out for the overrun case. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> [Mike Christie: Fix coding style issues in patch] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: Correct Extended Sense Data ErrorsKaren Higgins2009-07-301-45/+100
| | | | | | | | | | | | | | | | | | | Fixed sense data errors occurring above the first 32 bytes, as required by some third party applications. Sense data in the first 32 bytes has always been correct. Patch updated to use srb data variables instead of scsi command scratchpad data area, as scratchpad area is already used. Also, corrected debug print alignment bug in dump_buffer routine. Changed KERN_DEBUG to KERN_INFO in printk statements in this routine. Changed version number to 5.01.00-k9 Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> [michaelc: fixed checkpath.pl errors] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte ↵Mike Christie2008-10-131-2/+2
| | | | | | | | | | | | | | values This patch converts the iscsi drivers to the new host byte values. v2 Drop some conversions. Want to avoid conflicts with other patches. v1 initial patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla4xxx: fix scsi command completion, lun reset and target reset codeDavid C Somayajulu2008-04-071-35/+5
| | | | | | | | | | | | | | This patch contains the following: 1. when hba completion status is good, check for iscsi transport errors (underflow/overflow) prior to checking the scsi status 2. New firmware requires that one marker iocb be issued for each task management command. The patch issues marker iocb immediately following a LUN or Target reset. Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla4xxx: fix up residual handlingDavid Somayajulu2008-02-221-2/+1
| | | | | | | | | | the check in the residual case has an incorrect test of scsi_status (the logic is reversed, it should be scsi_status != 0 instead of !scsi_status. Since we checked a few lines above that scsi_status was non-zero, just eliminate this test Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori2008-01-231-7/+4
| | | | | | | | | 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>
* [SCSI] qla4xxx: Fix underrun/overrun conditionsDavid C Somayajulu2007-07-141-25/+32
| | | | | | | | | On Wed, 2007-06-06 at 11:55 -0700, David C Somayajulu wrote: This patch fixes the code handling underrun and overrun conditions. Also fixed coding style as per Mike Christie's advice. Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla4xxx: convert to use the data buffer accessorsFUJITA Tomonori2007-05-291-5/+5
| | | | | | | | | | | | | - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla4xxx: ql4_isr.c support for new mbx cmdsDavid C Somayajulu2007-05-261-18/+35
| | | | | | | | Add support to log all AENs and service mbx cmd completions for QLA4032 Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla4xxx: bug fixesDavid C Somayajulu2007-01-271-2/+2
| | | | | | | | | | | | | | | | | The included patch fixes the following issues: 1. qla3xxx/qla4xxx co-existence issue which can result in a lockup when qla3xxx driver is unloaded, or when ifdown; ifup is performed on one of the interfaces correponding to qla3xxx. This is because qla4xxx HBA supports one ethernet and iscsi interfaces per port. Both iscsi and ethernet interfaces share the same state machine. The problem has to do with synchronizing access to the state machine in the event of a reset 2. mutex_lock() is sometimes not followed by mutex_unlock() prior to invoking a msleep() in qla4xxx_mailbox_command() Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla4xxx: add support for qla4032David C Somayajulu2006-11-221-0/+1
| | | | | | | | | | | | | This patch provides the following: 1. adds support for the next version of Qlogic's iSCSI HBA, qla4032 (PCI Device ID 4032). 2. removes dead code related to topcat chip and renames qla4010_soft_reset to qla4xxx_soft_reset (minor changes). Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* [SCSI] Initial Commit of qla4xxxDavid Somayajulu2006-10-041-0/+797
open-iSCSI driver for Qlogic Corporation's iSCSI HBAs Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: Doug Maxey <dwm@bubba.enoyolf.org> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>