summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_def.h
AgeCommit message (Collapse)Author
2009-02-10[SCSI] qla2xxx: Properly acknowledge IDC notification messages.Andrew Vasquez
To ensure smooth operations amongst the FCoE and NIC side components of the ISP81xx chip, the FCoE driver (qla2xxx) must ensure the 10gb NIC driver (qlge) does not timeout waiting for IDC (Inter-Driver Communication) acknowledgments. The acknowledgment requirements are trivial -- a simple mirroring of incoming mailbox registers during the AEN to a process-context capable mailbox command. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-07[SCSI] qla2xxx: Add ISP81XX support.Andrew Vasquez
Codes to support new FCoE boards. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-07[SCSI] qla2xxx: Use proper request/response queues with MQ instantiations.Andrew Vasquez
Original code would inadvertanly place I/Os on the default request-queue. Also, correctly pass in the proper MSI-X vector during response-queue initialization. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-07[SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump.Andrew Vasquez
In preparation for new ISP types with varying dump procedures. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-07[SCSI] qla2xxx: Don't fallback to interrupt-polling during re-initialization ↵Andrew Vasquez
with MSI-X enabled. ROMs in recent ISPs have MSI-X support, so it's no longer necessary for the driver to fallback to interrupt polling during ISP re-initialization. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-07[SCSI] qla2xxx: Remove support for reading/writing HW-event-log.Andrew Vasquez
Software should not touch this region of flash, as the firmware will be the only writer and consumer of the region. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] qla2xxx: changes in multiq codeAnirban Chakraborty
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>
2008-12-29[SCSI] qla2xxx: add support for multi-queue adapterAnirban Chakraborty
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>
2008-12-29[SCSI] qla2xxx: Refactor qla data structuresAnirban Chakraborty
Following changes have been made to the qla2xxx FC driver in preparation for the multi- queue and future SR IOV hardware. 1. scsi_qla_host structure has been changed to contain scsi host specific data only. 2. A new structure, qla_hw_data is created to contain HBA specific hardware data. 3. Request and response IO specific data strucures are created. 4. The global list of fcports for the hba is not maintained anymore, instead a fcport list is construted on per scsi_qla_host. Signed-of-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-11-05[SCSI] qla2xxx: Correct Atmel flash-part handling.Lalit Chandivade
Use correct block size (4K) for erase command 0x20 for Atmel Flash. Use dword addresses for determining sector boundary. Cc: Stable Tree <stable@kernel.org> Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-16pci: change msi-x vector to 32bitYinghai Lu
we are using 28bit pci (bus/dev/fn + 12 bits) as irq number, so the cache for irq number should be 32 bit too. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-03[SCSI] qla2xxx: Add NPIV-Config Table support.Andrew Vasquez
To instatiate pre-configured vport entities defined within an HBA's flash memory. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-03[SCSI] qla2xxx: Add Flash Layout Table support.Andrew Vasquez
The Flash Layout Table (FLT) present on many recent HBAs encodes flash usage information, organizes data stored into separate regions and presents the information uniformly to the driver. Use this information rather than using specific hard-coded values based on ISP type. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-03[SCSI] qla2xxx: Add input/output byte-count statistics.Harish Zunjarrao
Currently Firmware does not have counters for input megabytes and output megabytes, therefore driver counts these values depending on the status of the scsi command and direction of the command. The values are exported in the FC_HOST path. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-03[SCSI] qla2xxx: Remove semaphore.hMatthew Wilcox
Now that qla2xxx has been converted to mutexes, it no longer needs the semaphore include. Signed-off-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>
2008-08-16[SCSI] qla2xxx: Explicitly tear-down vports during PCI remove_one().Andrew Vasquez
During internal testing, we've seen issues (hangs) with the 'deferred' vport tear-down-processing typically accompanied with the fc_remove_host() call. This is due to the current implementation's back-end vport handling being performed by the physical-HA's DPC thread where premature shutdown could lead to latent vport requests without a processor. This should also address a problem reported by Gal Rosen (http://marc.info/?l=linux-scsi&m=121731664417358&w=2) where the driver would attempt to awaken a previously torn-down DPC thread from interrupt context by implicitly calling wake_up_process() rather than the driver's qla2xxx_wake_dpc() helper. Rather, than reshuffle the remove_one() device-removal code, during unload, depend on the driver's timer to wake-up the DPC process, by limiting wake-ups based on an 'unloading' flag. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26[SCSI] qla2xxx: Retrieve board serial-number and description from VPD.Joe Carnuccio
Recent ISPs have this information written at manufacturing time, so use the information. This also reduces future churn of the qla_devtbl.h file contents, as the driver can now depend on the information to be present in VPD. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26[SCSI] qla2xxx: Cleanup NPIV related functionsSeokmann Ju
Removed repeated or unnecessary operations during vport creation/deletion. Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com> Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com> 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-07-26[SCSI] qla2xxx: Add LIP count to FC-transport statistics.Harish Zunjarrao
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26[SCSI] qla2xxx: Track total number of ISP aborts.Harish Zunjarrao
This parameter counts the total number of ISP aborts during driver execution. The value is exported through a DEVICE_ATTR() off the scsi_host. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-26[SCSI] qla2xxx: Add dev_loss_tmo_callbk/terminate_rport_io callback support.Seokmann Ju
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: Convert vport_sem to a mutexmatthias@kaehlcke.net
The semaphore vport_sem is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-18Convert asm/semaphore.h users to linux/semaphore.hMatthew Wilcox
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-07[SCSI] qla2xxx: Remove unused member (dma_handle) from srb_t structure.Andrew Vasquez
The member is not needed as there's no non-scatter-gather list I/Os submitted by the upper-layers. 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: Add midlayer target/device reset support.Andrew Vasquez
Now that infrastructure is present within the midlayer and there is a clear distinction between what is expected from a device and target reset, convert the current device-reset codes to a target-reset, and add codes to perform a proper device-reset (LUN reset). In the process of adding reset support, collapse and consolidate large sections of mailbox-command (TMF issuance) codes, generalize the two 'wait-for-commands-to-complete' functions, and add a generic-reset routine for use by midlayer reset functions. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.Andrew Vasquez
Some switches return 0x09 (Command not supported) as the reason code for GPSC failure. Check for this code, and disable additional GPSC queries if found. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla2xxx: Add Flash Descriptor Table layout support.Andrew Vasquez
The Flash Descriptor Table (FDT) present on many recent HBAs encodes flash accessing characteristics of the flash-part used on the HBA. Use this information during flash manipulation (writes) rather than using specific hard-coded values based on queried manufacturer and device IDs. 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: Use an rport's scsi_target_id member consistently throughout ↵Andrew Vasquez
driver. Rather than using a duplicate/cached value stored in the driver's internal fcport structure. 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-02-07[SCSI] qla2xxx: Access the proper 'physical' port in FC-transport callbacks.Seokmann Ju
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>
2008-02-01PCI: Remove users of pci_enable_device_bars()Benjamin Herrenschmidt
This patch converts users of pci_enable_device_bars() to the new pci_enable_device_{io,mem} interface. The new API fits nicely, except maybe for the QLA case where a bit of code re-organization might be a good idea but I prefer sticking to the simple patch as I don't have hardware to test on. I'll also need some feedback on the cs5520 change. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-23[SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.Andrew Vasquez
FCE support enables the firmware to record FC extended link services and basic link services frames which have been transmitted and received by the ISP. This allows for a limited view of the FC traffic through the ISP without using a FC analyzer. This can be useful in situations where a physical connection to the FC bus is not possible. The driver exports this information in two ways -- first, via a debugfs node exported for all supported ISPs under: <debugfs_mount_point>/qla2xxx/qla2xxx_<host_no>/fce where a read of the 'fce' file will provide a snapshot of the firmware's FCE buffer; and finally, the FCE buffer will be extracted during a firmware-dump scenario. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Trace-Control naming cleanups.Andrew Vasquez
In preparation for FCE (Fibre Channel Event) tracing support. 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: Fix for 32-bit platforms with 64-bit resources.Andrew Vasquez
The driver stores the contents of PCI resources into unsigned long's before ioremapping. This breaks on 32-bit platforms which support 64-bit MMIO resources. Correct code by removing the temporary variables used during MMIO PIO mapping and using resource_size_t where applicable. Also correct a small typo in a printk() where the wrong region number was displayed. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Retrieve additional HBA port statistics from recent ISPs.Andrew Vasquez
HBAs supporting these additional counters include ISP24xx and ISP25xx type boards. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] qla2xxx: Correct NPIV support for recent ISPs.Andrew Vasquez
Firmware will export to software the maximum number of vports supported for any given firmware version and ISP type. Use this information rather than the current hardcoding of limitations within the driver. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-10-23[SCSI] qla2xxx: Make driver (mostly) legacy I/O port free.Andrew Vasquez
Recent ISPs need only the single MMIO BAR to manipulate HW registers. Unfortunately, ISP21xx, ISP22xx, ISP23xx, and ISP63xx type cards still require the I/O mapped region to manipulate the FLASH via the two HW flash-registers (flash_address and flash_data). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Use shost_priv().Andrew Vasquez
Drop usage of legacy to_qla_host() macro. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Remove unused member (list) from srb_t structure.Andrew Vasquez
This change reduces by as much as 16% the memory footprint for each allocated sbr_t structure requested from the mempool. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Retrieve max-NPIV support capabilities from FW.Seokmann Ju
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Set correct attribute count during FDMI RPA.Andrew Vasquez
Also remove legacy '/proc' name during OS_DEVICE_NAME registration. 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-10-12[SCSI] qla2xxx: Allow region-based flash-part accesses.Joe Carnuccio
Additional cleanups and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.Andrew Vasquez
Add IO-base-window accessor functions. Merge duplicate RISC-pause and soft-reset code segments. Drop 'eye-watering' __iomem casting. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-08-15[SCSI] qla2xxx: Correct 8GB iIDMA support.Andrew Vasquez
Original implementation manipulated the FC_GS values for port-speed. Transition the codes to use the driver's own internal representations as this makes for a reduction in duplicate 'conversion' codes throughout the driver. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>