Commit Graph

546 Commits (ba55bd74360ea4b8b95e73ed79474d37ff482b36)

Author SHA1 Message Date
Andrew Vasquez 714df9399b [SCSI] qla2xxx: Update version number to 8.03.01-k3.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:47:02 -05:00
Andrew Vasquez 18e7555a38 [SCSI] qla2xxx: Synchronize MPI settings after a PE Reset.
Ensure MPS remains in synchronization across all NIC/FCoE
functions after a reset.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:47:00 -05:00
Andrew Vasquez 656e89122a [SCSI] qla2xxx: Export additional firmware-states for application support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:58 -05:00
Andrew Vasquez f999f4c196 [SCSI] qla2xxx: Reduce lock-contention during do-work processing.
Queued work processing will now be serialized with its own
lower-priority spinlock.  This also simplifies the work-queue
interface for future work-queue consumers.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:57 -05:00
Andrew Vasquez 6805c1504e [SCSI] qla2xxx: Avoid explicit LOGO during driver host tear-down.
As firmware will ultimately terminate (stop) and port
states-cleared.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:55 -05:00
Andrew Vasquez aed1088112 [SCSI] qla2xxx: Query supported RISC registers bits in determining a paused-state.
ISP24xx and above must query the host-status register, not HCCR.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:54 -05:00
Andrew Vasquez e8233ca40b [SCSI] qla2xxx: Avoid redundant RISC reset during (re)-initialization.
ISP24xx and above ISPs perform a RISC reset in
qla24xx_reset_chip(), which is called prior to
qla24xx_chip_diag().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:53 -05:00
Andrew Vasquez eeebcc9223 [SCSI] qla2xxx: Fallback enode-mac should not be a multicast address.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:51 -05:00
Andrew Vasquez 81eb9b4985 [SCSI] qla2xxx: Add notification message when an NPIV fails to acquire a port-id.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:50 -05:00
Andrew Vasquez 9f8fddeef2 [SCSI] qla2xxx: Add 10Gb iiDMA support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:49 -05:00
Andrew Vasquez f4658b6ccc [SCSI] qla2xxx: Mark a port's state as needing-rediscovery during link disruptions.
With RSCN states not being kept across qla2x00_configure_loop()
invocations, loop-resync distruptions during fabric-discovery may
cause ports to remain in a lost state.  Force state
renegotiation during a follow-on configure-loop iteration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:47 -05:00
Andrew Vasquez ca9e9c3eb1 [SCSI] qla2xxx: Check status of qla2x00_get_fw_version() call.
Unlike earlier ISPs, recent ISPs (ISP81xx) can in fact fail this
mailbox command.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:46 -05:00
Anirban Chakraborty 59e0b8b088 [SCSI] qla2xxx: Correct NULL pointer bug in cpu affinity mode.
This patch fixes a NULL pointer bug that occurs when IO is being
carried out on a vport for which the cpu affinity mode is turned on.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:44 -05:00
Andrew Vasquez 94b3aa47ac [SCSI] qla2xxx: Use 'proper' DID_* status code for dropped-frame scenarios.
The SCSI-midlayer's fast-fail codes consider an DID_ERROR status
as a driver-error and the failed I/O would then be retried in the
midlayer without being fast-failed to dm-multipath.  DID_BUS_BUSY
status returns would induce unneeded path-failures events being
propagated to the DM/MD.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:43 -05:00
Andrew Vasquez cbc8eb67da [SCSI] qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs.
In case the onboard firmware is unable to be read or loaded for
operation, attempt to fallback to a limited-operational firmware
image stored in a different flash region.  This will allow a user
to reflash and correct a board with proper operational firmware.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:41 -05:00
Anirban Chakraborty 40859ae5f1 [SCSI] qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:39 -05:00
Andrew Vasquez 1b91a2e671 [SCSI] qla2xxx: Correct logic-bug in set-model-info().
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:38 -05:00
Andrew Vasquez 11bbc1d896 [SCSI] qla2xxx: Export TLV data on supported ISPs.
Firmware currently provides PB and PGF TLVs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:36 -05:00
Andrew Vasquez ce0423f4a2 [SCSI] qla2xxx: Export XGMAC statistics on supported ISPs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:34 -05:00
Andrew Vasquez 7f77402517 [SCSI] qla2xxx: Export negotiated fabric-parameters for application support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-08 14:46:32 -05:00
Andrew Vasquez a03706017e [SCSI] qla2xxx: Update version number to 8.03.01-k2.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:11 -05:00
Anirban Chakraborty e5b68a61e1 [SCSI] qla2xxx: Use port number to compute nvram/vpd parameter offsets.
Read adapter's physical port number from interrupt pin register
and use it instead of pci function number to offset into the
nvram to obtain the port's configuration parameters.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:11 -05:00
Andrew Vasquez e337d9070e [SCSI] qla2xxx: Add an override option to specify ISP firmware load semantics.
As it may be useful during debugging to use a specific firmware
image.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:11 -05:00
Andrew Vasquez b469a7cbe9 [SCSI] qla2xxx: Don't try to 'stop' firmware if already in ROM code.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:10 -05:00
Michael Reed a13d8ac057 [SCSI] qla2xxx: Conditionally disable automatic queue full tracking.
Changing a lun's queue depth (/sys/block/sdX/device/queue_depth)
isn't sticky when the device is connected via a QLogic fibre
channel adapter.

The QLogic qla2xxx fibre channel driver dynamically adjusts a
lun's queue depth.  If a user has a specific need to limit the
number of commands issued to a lun (say a tape drive, or a shared
raid where the total commands issued to all luns is limited at
the controller level, for example) and writes a limiting value to
/sys/block/sdXX/device/queue_depth, the qla2xxx driver will
silently and gradually increase the queue depth back to the
driver limit of ql2xmaxqdepth.  While reducing this value (module
parameter) or increasing the interval between ramp ups
(ql2xqfullrampup) offers the potential for a work around it would
be better to have the option of just disabling the dynamic
adjustment of queue depth.

This patch implements an "off switch" as a module parameter.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:10 -05:00
Joe Carnuccio e1f916035f [SCSI] qla2xxx: Perform an implicit login to the Management Server.
Set the conditional plogi option bit whenever logging in the
fabric management server (if it is already logged in, it does not
need an explicit login; an implicit login suffices).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:09 -05:00
Andrew Vasquez 7d0dba174a [SCSI] qla2xxx: Restrict model-name/description device-table usage.
Information present in static table is only valid for pre-ISP25xx
adapters.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:09 -05:00
Harish Zunjarrao fc3ea9bcb8 [SCSI] qla2xxx: Correct hard-coded address of a second-port's NVRAM.
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:09 -05:00
Andrew Vasquez 8f97975136 [SCSI] qla2xxx: Correct typo in read_nvram() callback.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:08 -05:00
Anirban Chakraborty 67c2e93ae7 [SCSI] qla2xxx: Remove reference to request queue from scsi request block.
srbs used to maintain a reference to the request queue on which
it was enqueued. This is no longer required as the request queue
pointer is now maintained in the scsi host that issues the srb.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:08 -05:00
Anirban Chakraborty 68ca949cdb [SCSI] qla2xxx: Add CPU affinity support.
Set the module parameter ql2xmultique_tag to 1 to enable this
feature. In this mode, the total number of response queues
created is equal to the number of online cpus. Turning the block
layer's rq_affinity mode on enables requests to be routed to the
proper cpu and at the same time it enables completion of the IO
in a response queue that is affined to the cpu in the request
path.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:08 -05:00
Anirban Chakraborty 2afa19a937 [SCSI] qla2xxx: Add QoS support.
Set the number of request queues to the module paramater
ql2xmaxqueues.  Each vport gets a request queue. The QoS value
set to the request queues determines priority control for queued
IOs. If QoS value is not specified, the vports use the default
queue 0.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:07 -05:00
Andrew Vasquez 7640335ea5 [SCSI] qla2xxx: Correct compilation failures when DEBUG'n' options are enabled.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:07 -05:00
Andrew Vasquez bad7001c20 [SCSI] qla2xxx: Export additional FCoE attributes for application support.
Cull and export VN_Port MAC address and VLAN_ID information on
supported FCoE ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-20 17:21:07 -05:00
Seokmann Ju d53b48d512 [SCSI] qla2xxx: Correct bus-reset behaviour with recent ISPs.
The short-circuit to skip the non-applicable 'full-login-lip'
process on 81xx ISPs was nested too deeply in the 'bus-reset'
routine, as the code in qla2x00_loop_reset() should skip the
whole enable_lip_full_login process.  The original code could
cause device tear-down due to the qla2x00_wait_for_loop_ready()
call taking a large amount of time.

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>
2009-05-20 17:21:06 -05:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang 6a35528a83 dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:10 -07:00
Andrew Vasquez c59c61493f [SCSI] qla2xxx: Update version number to 8.03.01-k1.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:55 -05:00
Harish Zunjarrao 79c13a747d [SCSI] qla2xxx: Get FLT address in dword format.
FLTDS provides FLT address in the byte address format,
convert it to dword address for further use.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:54 -05:00
Seokmann Ju b9b12f73df [SCSI] qla2xxx: Correct several PCI-EEH issues.
In addition to checking for potentially unnecessary iomem
readX()/writeX() operations, a pci_channel_io_perm_failure should
not trigger a full internal removal.  Found during additional
testing with pSeries blade systems.

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>
2009-04-03 09:22:53 -05:00
Andrew Vasquez 6749ce362d [SCSI] qla2xxx: Don't cache VPD data for newer ISPs.
As updates will occur using low-level option-rom manipulation
routines.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:52 -05:00
Andrew Vasquez 24a081386e [SCSI] qla2xxx: Explicitly set the execution-throttle with recent ISPs.
Firmware semantics changed for 24xx and above ISPs in their
handling of the specified execution-throttle passed during
firmware initialization.  The original codes use of a theoretical
maximum (0xffff, as carried over from earlier ISPs) could in fact
act as a throttle in some circumstances.  Now set the value based
of the firmware's own 'resource' (exchange IOCBs) capabilities.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:52 -05:00
Andrew Vasquez d743de6675 [SCSI] qla2xxx: Reduce request queue-size overhead with recent ISPs.
The original code to 'resize request-queues' based on iocb-counts
and employed during early ISP23xx testing was too
overly-pessimistic with regards to latencies in the firmware
pulling requests.  Recent ISPs can easily keep up processing a
stream of commands from an abbreviated (effectively, half the
original size) queue.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:52 -05:00
Andrew Vasquez 3d79038f92 [SCSI] qla2xxx: Always use an FLT's NVRAM/VPD region information.
Rather than assuming a particular layout of the data.  Applies to
recent ISPs only.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:51 -05:00
Giridhar Malavali d1b1bef4c9 [SCSI] qla2xxx: Drop use of IRQF_DISABLE.
When IRQs are shared by multiple controllers and if the first one
to register does not disable the IRQ, then IRQ will be enabled
for all other controllers by default, irrespective of their
setting. With IRQF_DISABLED registration, the driver interrupt
routine was called with interrupt enabled always. Disbaling the
registration with IRQF_DISABLED, since driver code is re-entrant
safe and all critical sections are guarded with interrupt safe
locks.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:51 -05:00
Joe Carnuccio ad0ecd61f4 [SCSI] qla2xxx: Add EDC-update support.
Interface allows for the update of onboard EDC firmware
present on mezzanine ISP25xx type cards.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:51 -05:00
Lalit Chandivade fbcbb5d0cf [SCSI] qla2xxx: Export flash-block-size for application support.
In handling the RMW semantics needed to update regions not
falling on a sector boundary.

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>
2009-04-03 09:22:50 -05:00
Shyam Sundar ddb9b12632 [SCSI] qla2xxx: Cleanup unused flags and #defines.
General cleanup of extraneous/legacy crud.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:50 -05:00
Lalit Chandivade d0c3eefae0 [SCSI] qla2xxx: Remove implicit ISP-abort after a flash update.
For ISP24xx and above the ISP-abort after flash update is not
needed, as the only purpose it was serving was to update the boot
code and firmware versions in the scsi_qla_host_t structure.  Now
an update of the versions will be done in the write-vpd path.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:50 -05:00
Lalit Chandivade 6e181be508 [SCSI] qla2xxx: Add reset capabilities for application support.
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 09:22:49 -05:00