aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_inline.h
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.Arun Easi2011-08-271-2/+10
| | | | | | | | | | | | | | | | | | | | | This fix: - Disables app tag peeking; correct tag check will be added when the SCSI API is available. - Always derive ref_tag from scsi_get_lba() - Removes incorrect swap of FCP_LUN in FCP_CMND - Moves app-tag error check before ref-tag check. The reason being, currently there is no interface in SCSI to retrieve the app-tag for protection I/Os, so driver puts zero for app-tag in the firmware interface, but requests not to validate it, but when a ref-tag error is detected by firmware, it would put expected/actual tags for all the protection tags (guard/app/ref). As driver checks for app tag error first, a ref-tag error is incorrectly flagged as app-tag error. - Convert HBA specific checks to capability based. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.Arun Easi2011-08-271-0/+21
| | | | | | | | | | Driver needs to update protection bytes for uninitialized sectors as they are not DMA-d. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Reviewed-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.Saurav Kashyap2011-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The code is changed to support the new dynamic logging infrastructure. Following are the levels added. Default is 0 - no logging. 0x40000000 - Module Init & Probe. 0x20000000 - Mailbox Cmnds. 0x10000000 - Device Discovery. 0x08000000 - IO tracing. 0x04000000 - DPC Thread. 0x02000000 - Async events. 0x01000000 - Timer routines. 0x00800000 - User space. 0x00400000 - Task Management. 0x00200000 - AER/EEH. 0x00100000 - Multi Q. 0x00080000 - P3P Specific. 0x00040000 - Virtual Port. 0x00020000 - Buffer Dump. 0x00010000 - Misc. 0x7fffffff - For enabling all logs, can be too many logs. Setting ql2xextended_error_logging module parameter to any of the above value, will enable the debug for that particular level. Do LOGICAL OR of the value to enable more than one level. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] qla2xxx: Log fcport state transitions when debug messages are enabled.Chad Dupuis2011-05-011-0/+19
| | | | | | | | | | Add the inline function qla2x00_set_port_state() so that when a fcport state transition happens we can log the state transition if debug messages are enabled. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: Update copyright banner.Andrew Vasquez2011-05-011-1/+1
| | | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: Update copyright banner.Giridhar Malavali2010-07-281-1/+1
| | | | | Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: T10 DIF support added.Arun Easi2010-05-161-0/+16
| | | | | | Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: Add ISP82XX support.Giridhar Malavali2010-05-011-1/+4
| | | | | | | Enhanced the driver to support new FCoE host bus adapter. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: changes in multiq codeAnirban Chakraborty2008-12-291-1/+1
| | | | | | | | | | Following changes have been made: 1. Scan outstanding commands only in the queue where it is submitted 2. Update queue registers directly in the fast path 3. Queue specific BAR is remapped only for multiq capable adapters Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla2xxx: add support for multi-queue adapterAnirban Chakraborty2008-12-291-26/+0
| | | | | | | | | | | | | | | | | | Following changes have been made. 1. qla_hw_data structure holds an array for request queue pointers, and an array for response queue pointers. 2. The base request and response queues are created by default. 3. Additional request and response queues are created at the time of vport creation. If queue resources are exhausted during vport creation, newly created vports use the default queue. 4. Requests are sent to the request queue that the vport was assigned in the beginning. 5. Responses are completed on the response queue with which the request queue is associated with. [fixup memcpy argument reversal spotted by davej@redhat.com] Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla2xxx: Code changes for qla data structure refactoringAnirban Chakraborty2008-12-291-16/+11
| | | | | | | | | | | | | | | | Following changes have been made: 1. Outstanding commands are based on a request queue, scsi_qla_host does not maintain it anymore. 2. start_scsi is accessed via isp_ops struct instead of direct invocation. 3. Interrupt registrations are done using response queue instead of device id. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla2xxx: Fix "occured" spelling errors.Bjorn Helgaas2008-10-031-1/+1
| | | | | | | | | | 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>
* [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.Andrew Vasquez2008-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matthew Wilcox <matthew@wil.cx> reported the following lockdep warning: > ================================= > [INFO:inconsistentlockstate] > 2.6.26-rc1-00115-g0340eda-dirty#60 > --------------------------------- > inconsistent{hardirq-on-W}->{in-hardirq-W}usage. > swapper/1[HC1[1]:SC0[0]:HE0:SE1]takes: > (&ha->hardware_lock){+-..},at:[<c035495d>]qla2300_intr_handler+0x35/0x1f5 > {hardirq-on-W}statewasregisteredat: > [<c0139a16>]__lock_acquire+0x459/0xb1d > [<c013a091>]__lock_acquire+0xad4/0xb1d > [<c013a142>]lock_acquire+0x68/0x82 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c0506da5>]_spin_lock+0x24/0x4d > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c01391e4>]trace_hardirqs_on+0xe7/0x10e > [<c034f0a6>]qla2x00_mailbox_command+0x1c6/0x433 ... > other info that might help us debug this: > no locks held by swapper/1. > > stack backtrace: > Pid:1,comm:swapperNottainted2.6.26-rc1-00115-g0340eda-dirty#60 > [<c0138121>]print_usage_bug+0x100/0x10a > [<c0138d37>]mark_lock+0xaa/0x395 > [<c01399af>]__lock_acquire+0x3f2/0xb1d > [<c013a091>]__lock_acquire+0xad4/0xb1d > [<c013a142>]lock_acquire+0x68/0x82 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c0506da5>]_spin_lock+0x24/0x4d > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5 > [<c014a37b>]handle_IRQ_event+0x13/0x3d > [<c014b366>]handle_fasteoi_irq+0x76/0xab Which shows that lockdep is detecting the driver's interrupt-handler is run in both process and interrupt context with irqs-enabled in the former case. During init-time and error-recovery (after a RISC reset), the driver disables interrupts and 'polls' for completions by calling qla2x00_poll(): static inline void qla2x00_poll(scsi_qla_host_t *ha) { ha->isp_ops->intr_handler(0, ha); } which in-turn calls the ISP registered interrupt handler. This patch corrects it by disabling local interrupts during polling. Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla2xxx: Cruft cleanup of functions and structures.Andrew Vasquez2008-04-071-85/+0
| | | | | | | | | 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>
* [SCSI] qla2xxx: Update copyright banner.Andrew Vasquez2008-04-071-1/+1
| | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] qla2xxx: Access the proper 'physical' port in FC-transport callbacks.Seokmann Ju2008-02-071-0/+7
| | | | | | | | | | | | | | | | For following fc_host specific attributes, vports rely on the pport. So, this patch changed way to access the data for those attributes so that they can access pport's. - get_host_speed (speed) - get_host_port_state (port_state) - get_host_port_type (port_type) - get_fc_host_stats Also, added PORT_SPEED_8GB case in the speed attribute for 8Gb HBAs. 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>
* [SCSI] qla2xxx: Re-factor isp_operations to static structures.Andrew Vasquez2007-07-201-1/+1
| | | | | | | In preparation for new ISP types. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Generalize FW-Interface-2 support.Andrew Vasquez2007-07-201-1/+1
| | | | | | | In preparation for new ISP types. Signed-off-by: Andrew Vasquez <andrew.vasquez@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-1/+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] qla2xxx: Add ISP54xx support.andrew.vasquez@qlogic.com2006-03-121-1/+1
| | | | | | | Chip is similar in form to our ISP24xx offering. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Update license.Andrew Vasquez2005-10-281-16/+3
| | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Update copyright banner.Andrew Vasquez2005-07-141-1/+1
| | | | | | | Update copyright banner. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Code scrubbing.Andrew Vasquez2005-07-141-82/+4
| | | | | | | | | | | Code scrubbing. - Remove trailing whitespace from driver files. - Remove unused #defines and inlines. - Standardize on C comments (// -> /* */) Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Add ISP24xx IOCB manipulation routines.Andrew Vasquez2005-07-141-0/+13
| | | | | | | | | | | | Add ISP24xx IOCB manipulation routines. Add appropriate glue-code for ISP24xx support while manipulting IOCB packets. Add an ISP24xx specific 'start_scsi' routine due to command-type-7 layout changes. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Add ISP24xx definitions.Andrew Vasquez2005-07-141-0/+11
| | | | | | | | | | | | Add ISP24xx definitions. Add requisite structure definitions and #define's for ISP24xx support. Also drop volatile modifiers from device_reg_* register layouts as the members are never really accessed, only their offsets within the layout are used during reads and writes. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.Andrew Vasquez2005-07-141-38/+1
| | | | | | | | | | Factor-out ISP specific functions to method-based call tables. In anticipation of ISP24xx/ISP25xx support, factor-out ISP specific functions into a method-based call table. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] qla2xxx: remove lun discovery codes...2005-04-181-17/+0
| | | | | | | | Remove internal lun discovery routines and support structures. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+292
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!