Commit Graph

302 Commits (360b03ed178a4fe3971b0a098d8feeb53333481b)

Author SHA1 Message Date
Andrew Vasquez a7b6184225 [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
Hardcoding the qlport_down_retry module-parameter
effectively disallowed any user-defined NVRAM setting to go
into effect.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:20:52 -05:00
Andrew Vasquez 765140bf22 [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
Remove a stale check against ha->device_flags
(DFLG_NO_CABLE) as topology scanning is performed within the
DPC-thread context.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:20:39 -05:00
Bernhard Walle 665db93b8a [SCSI] qla2xxx: Remove duplicate pci_disable_device() call
On the path qla2x00_probe_one() -> probe_failed -> qla2x00_free_device(),
pci_disable_device() is executed twice, once in qla2x00_free_device()
and once in qla2x00_probe_one().

This patch removes the unnecessary call.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01 10:27:29 -05:00
Andrew Vasquez 27d9403528 [SCSI] qla2xxx: Allow the extended-error-logging flag to be dynamic.
The module parameter, ql2xextended_error_logging, can now be
set dynamically by writing to the following sysfs entry:

	/sys/module/qla2xxx/parameters/ql2xextended_error_logging

This alleviates the need for the driver to be unloaded and
reloaded in order to enable logging.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20 10:51:20 -05:00
Andrew Vasquez ed67708639 [SCSI] qla2xxx: Add scan_[start|finish]() callbacks for ISP24xx HBAs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20 10:50:05 -05:00
James Bottomley 30716e07ef Merge branch 'linus' 2007-01-31 11:24:00 -06:00
Seokmann Ju 03c79cc56e [SCSI] qla2xxx: Remove unnecessary spinlock primitive - mbx_reg_lock.
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 11:15:09 -06:00
Andrew Vasquez 30c4766213 [SCSI] qla2xxx: Export OptionROM boot-codes version information.
This includes BIOS, EFI, FCODE and firmware versions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-31 11:06:38 -06:00
Andrew Vasquez a8488abefa [SCSI] qla2xxx: Add MSI-X support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-31 11:05:20 -06:00
Andrew Vasquez 0c8c39af16 [SCSI] qla2xxx: Correct reset handling logic.
- honor ISP24XX NVRAM settings for lip-reset, full-login-lip, and
  device-reset.
- correct LIP_FULL_LOGIN mailbox command issuance.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03 16:58:01 -06:00
Andrew Vasquez 8bc69e7dc3 [SCSI] qla2xxx: Correct IOCB queueing mechanism for ISP54XX HBAs.
Original code would incorrectly use non-24xx code-paths.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03 16:57:58 -06:00
Christoph Lameter e18b890bb0 [PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:25 -08:00
Andrew Vasquez 1e99e33ad9 [SCSI] qla2xxx: add asynchronous scsi scanning support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:43:28 -06:00
Andrew Vasquez d19044c32b [SCSI] qla2xxx: defer topology discovery to DPC thread during initialization.
Modify intialization semantics:

- perform basic hardware configuration only (as usual)
  - allocate resources
  - load and execute firmware

- defer link (transport) negotiations to the DPC thread
  - again the code in qla2x00_initialize_adapter() to stall probe()
    completion was needed for legacy-style scanning.
  - DPC thread stalls until probe() complete.

- before probe() completes, set DPC flags to perform loop-resync logic
  (similar to what's done during cable-insertion/removal).

Benefits: user does not have to wait 20+ seconds in case the FC cable
is unplugged during driver load, code consolidation (removal of
redundant link negotiation logic during initialize_adaoter()), and
finilly, the driver no longer needs to defer the fc_remote_port_add()
calls to hold off lun-scanning prior to returning from the probe()
function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22 16:43:16 -06:00
James Bottomley 0bd2af4683 Merge ../scsi-rc-fixes-2.6 2006-11-22 12:06:44 -06:00
Adrian Bunk e5f82ab834 [SCSI] qla2xxx: make some functions static
This patch makes some needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 16:42:35 -06:00
Andrew Vasquez df7baa506c [SCSI] qla2xxx: Correct QUEUE_FULL handling.
- Drop queue-depths across all luns for a given fcport
  during TASK_SET_FULL statuses.
- Ramp-up I/Os after throttling.
- Consolidate completion-status handling of CS_QUEUE_FULL with
  CS_COMPLETE as ISP24xx firmware no longer reports
  CS_QUEUE_FULL.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:08 -07:00
Andrew Vasquez 18c6c12759 [SCSI] qla2xxx: Workaround D3 power-management issues.
Early ISP2432 parts have a known hardware issue when coming
out of a D3 hot state.  This issue can result in a hung PCIe
link.  Recent firmwares contain a workaround whereby the
stop-firmware mailbox command prevents the ISP from entering
the D3 hot state.

In order to ensure that the workaround succeeded the driver
must verify that the stop-firmware mailbox command completes
successfully.  In the event of a failure, the driver
attempts a shutdown-retry after resetting the ISP and
re-executing firmware.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:04 -07:00
Andrew Vasquez 11010fecd2 [SCSI] Maintain module-parameter name consistency with qla2xxx/qla4xxx.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:17 -07:00
Frederik Deweerdt d7a297baa6 [PATCH] fix qla{2,4} build error
commit 0181944fe6 adds a
'extended_error_logging' global variable to qla2xxx which is defined by
qla4xxx too.

Trying to build both drivers results in the following error:

  LD      drivers/scsi/built-in.o
  drivers/scsi/qla4xxx/built-in.o: In function `qla4xxx_slave_configure':
  drivers/scsi/qla4xxx/ql4_os.c:1433: multiple definition of `extended_error_logging'
  drivers/scsi/qla2xxx/built-in.o:drivers/scsi/qla2xxx/qla_os.c:2166:
  first defined here
  make[2]: *** [drivers/scsi/built-in.o] Error 1
  make[1]: *** [drivers/scsi] Error 2
  make: *** [drivers] Error 2

The following patch simply adds a qla2_ (qla4_ respectively) prefix to
the variable name.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-05 15:49:02 -07:00
Andrew Vasquez 07db518313 [SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
Stall error handler if attempting recovery while an rport is
blocked.  This avoids device offline scenarios due to errors in
the error handler.

Reference implementation from lpfc/mptfc.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:06 -05:00
Andrew Vasquez bb8ee49984 [SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:02 -05:00
Andrew Vasquez d8b4521349 [SCSI] qla2xxx: Add iIDMA support.
iIDMA (Intelligent Interleaved Direct Memory Access) allows for
the HBA hardware to send FC frames at the rate at which they can
be received by a target device.  By taking advantage of the
higher link rate, the HBA can maximize bandwidth utilization in a
heterogeneous multi-speed SAN.

Within a fabric topology, port speed detection is done via a Name
Server command (GFPN_ID) followed by a Fabric Management command
(GPSC).  In an FCAL/N2N topology, port speed is based on the HBA
link-rate.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:38 -05:00
Andrew Vasquez 9c06938aa4 [SCSI] qla2xxx: Correct PLOGI retry logic.
Original code attempts to retry PLOGIs to fcports that are
FCP_TARGETs only.  If the driver never performed a successful
PLOGI/PRLI, the port-type would never be assigned, and the
relogin logic would silently drop the request (and thus the port
would not be recognized and registered).

The fix is relatively straightforward, drop the FCP_TARGET-only
check.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:27 -05:00
Vladislav Bolkhovitin b0328beed0 [SCSI] qla2xxx: Fix to allow to reset devices using sg interface (sg_reset).
Currently it is impossible to reset provided by Qlogic QLA2xxx driver
SCSI devices externally using corresponding sg devices, particularly via
sg_reset utility, because qla2xxx driver in qla2xxx_eh_device_reset()
function checks if the input scsi_cmnd has its private data (CMD_SP())
attached. Then the found pointer isn't used anywhere inside of
qla2xxx_eh_device_reset(). If the RESET request comes from sg device, it
doesn't have such private data.

The attached patch removes check for non-NULL CMD_SP() from
qla2xxx_eh_device_reset(), hence allows to reset QLA2xxx's devices using
corresponding sg devices.

AV: change applies to bus/host reset handlers as well.

Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:30:28 -05:00
James Bottomley c4e00fac42 Merge ../scsi-misc-2.6
Conflicts:

	drivers/scsi/nsp32.c
	drivers/scsi/pcmcia/nsp_cs.c

Removal of randomness flag conflicts with SA_ -> IRQF_ global
replacement.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-03 09:41:12 -05:00
Thomas Gleixner 1d6f359a2e [PATCH] irq-flags: scsi: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:53 -07:00
Jesper Juhl 900d9f9873 [SCSI] small whitespace cleanup for qlogic driver
Add a few spaces to MODULE_PARM_DESC() text for qla2xxx. Without these
spaces text runs together when modinfo prints the text.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30 21:30:01 -05:00
Andrew Vasquez 7ee6139709 [SCSI] qla2xxx: Convert from pci_module_init() to pci_register_driver().
Also remove qla2xxx_probe_one/qla2xxx_remove_one stubs previously
used with external firmware module loaders.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:25:18 -05:00
Andrew Vasquez 0181944fe6 [SCSI] qla2xxx: Add support for extended error logging.
Similar in form to QLogic's standard offering -- via
the 'extended_error_logging' module parameter.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:24:36 -05:00
Andrew Vasquez 744f11fdb1 [SCSI] qla2xxx: Cleanup DEBUG macro usage.
- macro usage statements should terminate with a ';'
- remove unused macros.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:24:07 -05:00
Andrew Vasquez 7469059d52 [SCSI] qla2xxx: Remove no-op IOCTL codes and macros.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:23:49 -05:00
Andrew Vasquez 88729e53a4 [SCSI] qla2xxx: Add DMI (Diagnostics Monitoring Interface) support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:22:40 -05:00
Andrew Vasquez a7a167bf7e [SCSI] qla2xxx: Rework firmware-trace facilities.
- Defer firmware dump-data raw-to-textual conversion to
  user-space.
- Add module parameter (ql2xallocfwdump) to allow for per-HBA
  allocations of firmware dump memory.
- Dump request and response queue data as per firmware group
  request.
- Add extended firmware trace support for ISP24XX/ISP54XX chips.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-26 16:20:44 -05:00
James Bottomley f0cd91a68a Merge ../linux-2.6 2006-06-10 13:47:26 -05:00
Andrew Vasquez d4e3e04d78 [SCSI] qla2xxx: Consolidate firmware-dump handling across ISPs.
Simplify and centralise buffer allocation/deallocation, as
there's no point in having two memory request methods.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:50:11 -05:00
Andrew Vasquez cb63067a77 [SCSI] qla2xxx: Consolidate "qla2xxx" string usage to a #define.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:49:53 -05:00
Andrew Vasquez 47f5e069e4 [SCSI] qla2xxx: Use PCI_DEVICE() for pci_device_id definition.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:49:37 -05:00
Andrew Vasquez 441d107204 [SCSI] qla2xxx: Remove obsolete firmware-loader-module support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:49:13 -05:00
Andrew Vasquez 4971cd221a [SCSI] qla2xxx: Remove unused port-type RSCN handling code.
Expandind on the previous commit:

	commit 79f89a4296
	Author: andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>
	Date:   Fri Jan 13 17:05:58 2006 -0800

	[SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.

and given:

- the process-context requirements of the FC transport
  rport-APIs.
- lack of port-type RSCN processing logic for ISP24xx and newer
  chips.

it's time now to remove the state-machine logic from mainline.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:43:44 -05:00
Andrew Vasquez 75bc419070 [SCSI] qla2xxx: Drop unused driver cruft.
- structure definitions.
- structure members.
- #define's.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:43:22 -05:00
Ravi Anand 57680080ba [SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD state is attained.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-20 09:40:21 -05:00
Michael Reed 2ea0020250 [SCSI] qla2xxx: Correct eh_abort recovery logic.
Fix the driver to return SUCCESS if the firmware or driver doesn't
have a command to abort, i.e., it's already been returned.  Without
this patch, error recovery will take the target offline as it tries
harder and harder to get the driver to return the command it no longer
has.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-27 18:29:55 -05:00
Zach Brown 77347ff755 [SCSI] qla2xxx: only free_irq() after request_irq() succeeds
If qla2x00_probe_one() fails before calling request_irq() but gets to
qla2x00_free_device() then it will mistakenly try to free an irq it didn't
request.  It's chosing to free based on ha->pdev->irq which is always set.

host->irq is set after request_irq() succeeds so let's use that to decide
to free or not.

This was observed and tested when a silly set of circumstances lead to
firmware loading failing on a 2100.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-19 20:52:13 -04:00
Matthew Dobson 93d2341c75 [PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool()
rather than calling mempool_create() with extra arguments, saving about 30
lines of code and increasing readability.

Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:57:00 -08:00
andrew.vasquez@qlogic.com 9a52a57cb9 [SCSI] qla2xxx: Correct FCAL login retry logic for ISP24xx.
ISP24XX FW does not support Mbx 0x74 ie Login Local Port.
Added the equivalent code for ISP24XX ie to relogin in non
fabric case for ISP24XX use login iocb.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:40:37 -06:00
andrew.vasquez@qlogic.com 4a59f71d7f [SCSI] qla2xxx: Further restrict ZIO mode support.
Only support ZIO mode 6 on specific ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:40:13 -06:00
andrew.vasquez@qlogic.com 48c02fde94 [SCSI] qla2xxx: Consolidate ISP63xx handling.
As new 23xx firmware will accomidate ISP63xx types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:38:22 -06:00
andrew.vasquez@qlogic.com 044cc6c8ec [SCSI] qla2xxx: Add ISP54xx support.
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>
2006-03-12 09:38:03 -06:00
andrew.vasquez@qlogic.com ea5b6382fd [SCSI] qla2xxx: Convert IS_QLA*() defines to bit-operations.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:37:24 -06:00
Christoph Hellwig 39a112403f [SCSI] qla2xxx: use kthread_ API
Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.

Also switch from semaphore-based thread wakeup to wake_up_process.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-By: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-02 22:56:40 -06:00
andrew.vasquez@qlogic.com f7757a5f0f [PATCH] qla2xxx: Remove bogus debug-code.
Commit 854165f424
inadvertently added some code meant only for testing -- the
driver was ignoring the non-zero function numbers of a
multi-port HBA.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:02 -06:00
andrew.vasquez@qlogic.com 387f96b4d9 [PATCH] qla2xxx: Close window on race between rport removal and fcport transition.
Fcport visibility is recognized during interrupt time, but,
rport removal can only occur during a process
(sleeping)-context.  Return a DID_IMM_RETRY status for
commands submitted within this window to insure I/Os do not
prematurely run-out of retries.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:53:56 -06:00
andrew.vasquez@qlogic.com 854165f424 [SCSI] qla2xxx: Add support to retrieve/update HBA option-rom.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:12:41 -06:00
andrew.vasquez@qlogic.com f6df144cca [SCSI] qla2xxx: Add beacon support via class-device attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:11:57 -06:00
andrew.vasquez@qlogic.com 04414013bb [SCSI] qla2xxx: Add port-speed FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:10:07 -06:00
andrew.vasquez@qlogic.com 052c40c83b [SCSI] qla2xxx: Correct issue where the rport's upcall was not being made after relogin.
A target can LOGO an initiator at any time (i.e. during I/O,
due to a controller hicup, or as a simple authentication
mechanism after an initial CDB command), when this occurs,
the driver attempts to relogin (PLOGI) to the device via the
DPC thread.  Add code to make the appropriate upcall to the
FC transport layer (fc_remote_port_add()) upon successful
completion of the PLOGI.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:17:00 -05:00
andrew.vasquez@qlogic.com d97994dc1f [SCSI] qla2xxx: Correct synchronization issues during rport addition/deletion.
The driver can typically detect port-loss during an
interrupt context (i.e. via interrogation of a status IOCB's
completion status [CS_PORT_LOGGED_OUT].  Due to the calling
requirements of the fc_rport APIs, the driver would defer
removal of the device to the default workqueue.  If the
work-item was preceded by an event which caused the port to
obtain visibility (relogin successful, target re-logged into
the topology), deferred removal could inadvertently drop the
rport.  The code also no longer defers removal via the
default workqueue, instead opting for use of the driver's
own DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:16:50 -05:00
andrew.vasquez@qlogic.com 79f89a4296 [SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.
Given the semantic changes in both the device-model and
fc-transport APIs, the driver's handling of port-type RSCNs
via a series of ADISCs and PLOGIs can cause series of
badness ranging from unexpectedly device loss to devices not
being discovered.

In the interim, disable (via a module-parameter) this
feature and allow RSCN management to continue to occur
within the driver's DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14 10:55:39 -06:00
James Bottomley 0a21ef1e60 [SCSI] qla2xxx: fix compile error caused by pci_dev.owner move
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:12:07 -07:00
Andrew Vasquez 331e347686 [SCSI] qla2xxx: Add support for embedded ISP24xx firmware.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:19 -07:00
Andrew Vasquez 5433383ef3 [SCSI] qla2xxx: Add full firmware(-request) hotplug support for all ISPs.
Transition driver to exclusively use the request_firmware()
interfaces to retrieve firmware-blobs from user-space.  This
will be the default behaviour going forward until the
embedded firmware-binary images are removed from the
upstream kernel.

Upon request, the driver caches the firmware image until the
driver is unloaded.

NOTE: The option is present to allow the user to continue to
use the firmware-loader modules, but, should be considered
deprecated.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:16 -07:00
James.Smart@Emulex.Com 19a7b4aebf [SCSI] update fc_transport for removal of block/unblock functions
We recently went back to implement a board reset. When we perform the
reset, we wanted to tear down the internal data structures and rebuild
them. Unfortunately, when it came to the rport structure, things were
odd. If we deleted them, the scsi targets and sdevs would be
torn down. Not a good thing for a temporary reset. We could block the
rports, but we either maintain the internal structures to keep the
rport reference (perhaps even replicating what's in the transport),
or we have to fatten the fc transport with new search routines to find
the rport (and deal with a case of a dangling rport that the driver
forgets).

It dawned on me that we had actually reached this state incorrectly.
When the fc transport first started, we did the block/unblock first, then
added the rport interface. The purpose of block/unblock is to hide the
temporary disappearance of the rport (e.g. being deleted, then readded).
Why are we making the driver do the block/unblock ? We should be making
the transport have only an rport add/delete, and the let the transport
handle the block/unblock.

So... This patch removes the existing fc_remote_port_block/unblock
functions. It moves the block/unblock functionality into the
fc_remote_port_add/delete functions.  Updates for the lpfc driver are
included. Qlogic driver updates are also enclosed, thanks to the
contributions of Andrew Vasquez. [Note: the qla2xxx changes are
relative to the scsi-misc-2.6 tree as of this morning - which does
not include the recent patches sent by Andrew]. The zfcp driver does
not use the block/unblock functions.

One last comment: The resulting behavior feels very clean. The LLDD is
concerned only with add/delete, which corresponds to the physical
disappearance.  However, the fact that the scsi target and sdevs are
not immediately torn down after the LLDD calls delete causes an
interesting scenario... the midlayer can call the xxx_slave_alloc and
xxx_queuecommand functions with a sdev that is at the location the
rport used to be. The driver must validate the device exists when it
first enters these functions. In thinking about it, this has always
been the case for the LLDD and these routines. The existing drivers
already check for existence. However, this highlights that simple
validation via data structure dereferencing needs to be watched.
To deal with this, a new transport function, fc_remote_port_chkready()
was created that LLDDs should call when they first enter these two
routines. It validates the rport state, and returns a scsi result
which could be returned. In addition to solving the above, it also
creates consistent behavior from the LLDD's when the block and deletes
are occuring.

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 21:20:07 -05:00
Andrew Vasquez 91ca7b01ec [SCSI] Add an 'Issue LIP' device attribute in fc_transport class
Ok, here's a patch to add such a common API for fc transport users.
Relevant LLD changes (lpfc and qla2xxx) also present.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 19:35:25 -05:00
James Bottomley 28f22b031f [SCSI] qla2xxx: put back label erroneously removed by eh_active patch
The label eh_dev_reset_done is still in use

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 17:22:18 -05:00
Andrew Vasquez 9a41a62b74 [SCSI] qla2xxx: remove eh_active checks in qla2xxx error handling
Here's a patch which drops the eh_active checks in the qla2xxx
eh_handler callbacks.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 13:25:26 -05:00
Andrew Vasquez fa90c54f6d [SCSI] qla2xxx: Update license.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 11:53:23 -05:00
Andrew Vasquez 4fdfefe529 [SCSI] qla2xxx: Add support to dynamically enable/disable ZIO.
ISP23xx and ISP24xx chips have support for an adaptive
method of posting SCSI command completions for multiple SCSI
commands during a single system interrupt.

SCSI commands are placed on the system response queue
without interrupting the host until 1) a delay timer
expires; or 2) a SCSI command completes with an error.

As long as the host software (qla2xxx) services the response
queue for completions (this polling is done during
queuecommand()) within the 'delay timer' period, the
firmware will not generate system interrupt.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 11:52:11 -05:00
Andrew Morton 444d1d9bb5 [PATCH] qlogic lockup fix
If qla2x00_probe_one()'s call to qla2x00_iospace_config() fails, we call
qla2x00_free_device() to clean up.  But because ha->dpc_pid hasn't been set
yet, qla2x00_free_device() tries to stop a kernel thread which hasn't started
yet.  It does wait_for_completion() against an uninitialised completion struct
and the kernel hangs up.

Fix it by initialising ha->dpc_pid a bit earlier.

Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-25 13:51:48 -07:00
Andrew Vasquez f6ef3b1872 [SCSI] qla2xxx: Stop firmware execution at unintialization time.
On ISP24xx parts, stop execution of firmware during ISP
tear-down.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:57 -05:00
Andrew Vasquez fe74c71f6b [SCSI] qla2xxx: Replace schedule_timeout().
From: Nishanth Aravamudan <nacc@us.ibm.com>

Replace schedule_timeout() with
msleep()/msleep_interruptible() as appropriate, to guarantee the task
delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:52 -05:00
Andrew Vasquez 86cd6baa82 [SCSI] qla2xxx: Remove bad call to fc_remove_host() during probe failure.
fc_remove_host() should only be called after a scsi_host has
been successfully added via scsi_add_host() -- any failures
while qla2xxx probing would result in an incorrect call to
fc_remove_host() during cleanup.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:50 -05:00
Andrew Vasquez afb046e2be [SCSI] qla2xxx: Add host attributes.
Export additional host information via the shost_attrs member in
the scsi_host template.  Attributes include: driver version,
firmware version, ISP serial number, ISP type, ISP product ID,
HBA model name, HBA model description, PCI interconnect
information, and HBA port state.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:42 -05:00
Andrew Vasquez ce7e4af7f5 [SCSI] qla2xxx: Add change_queue_depth/type() API support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:40 -05:00
Andrew Vasquez c00c72ae01 [SCSI] qla2xxx: Simplify redundant target/device reset logic.
Remove redundant qla2x00_target_reset() function in favour of
the equivalent qla2x00_device_reset().  Update callers of
old function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:10 -05:00
Andrew Vasquez cca5335caf [SCSI] qla2xxx: Add FDMI support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:07 -05:00
Andrew Vasquez 7524f9b9e7 [SCSI] qla2xxx: Use dma_get_required_mask() in determining the 'ideal' DMA mask.
In order to efficiently utilise the ISP's IOCB
request-queue, use the dma_get_required_mask() function to
determine the use of command-type 2 or 3 IOCBs when queueing
SCSI commands.  This applies to ISP2[123]xx chips only, as
the ISP24xx uses command-type 7 IOCBs which use 64bit DSDs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:02 -05:00
Andrew Vasquez 77d7414361 [SCSI] qla2xxx: Cleanup FC remote port registration.
Cleanup FC remote port registration.

Due to the inherent behaviour (an immediate scan) of adding
a 'target'-role-capable rport via fc_remote_port_add(),
split the registration into two steps -- addition as
unknown-type role, then use fc_remote_port_rolchg() with
appropriate role (based on PLOGI/PRLI bits).  This allows
for a more cleaner rport->dd_data management as can be seen
with the simplified qla2xxx_slave_alloc() function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:15:55 -04:00
Andrew Vasquez f0883ac6a7 [SCSI] qla2xxx: Add firmware version number to qla24xx_fw_version_str().
Add firmware version number to qla24xx_fw_version_str().

Original code was accidently trimmed during port.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:15:10 -04:00
Andrew Vasquez ae91193cd5 [SCSI] qla2xxx: Update copyright banner.
Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:12:12 -04:00
Andrew Vasquez fa2a1ce53d [SCSI] qla2xxx: Code scrubbing.
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>
2005-07-14 11:03:15 -04:00
Andrew Vasquez fca2970371 [SCSI] qla2xxx: Add OS initialization codes for ISP24xx recognition.
Add OS initialization codes for ISP24xx recognition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:02:23 -04:00
Andrew Vasquez 0107109ed6 [SCSI] qla2xxx: Add ISP24xx initialization routines.
Add ISP24xx initialization routines.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 11:02:06 -04:00
Andrew Vasquez 459c537807 [SCSI] qla2xxx: Add ISP24xx flash-manipulation routines.
Add ISP24xx flash-manipulation routines.

Add read/write flash manipulation routines for the ISP24xx.
Update sysfs NVRAM objects to use generalized accessor
functions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 10:56:54 -04:00
Andrew Vasquez 1c7c63574f [SCSI] qla2xxx: Add MBX command routines for ISP24xx support.
Add MBX command routines for ISP24xx support.

Generalize several routines [qla2x00_load_ram_ext(),
qla2x00_execute_fw(), qla2x00_verify_checksum()] to handle
larger addressing space.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14 10:56:39 -04:00
Andrew Vasquez 3d71644cf9 [SCSI] qla2xxx: Add ISP24xx definitions.
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>
2005-07-14 10:54:46 -04:00
Andrew Vasquez abbd8870b9 [SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.
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>
2005-07-14 10:47:30 -04:00
James Bottomley 3afa294c40 merge by hand (qla_os.c mismerge) 2005-06-17 19:04:18 -05:00
James Bottomley 3237ee78fc merge by hand (fix up qla_os.c merge error) 2005-06-17 18:42:23 -05:00
Jeff Garzik df0ae2497d [SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:18 -05:00
Jeff Garzik 68b3aa7c98 [SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:10 -05:00
Jeff Garzik 94d0e7b805 [SCSI] allow sleeping in ->eh_device_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:03 -05:00
Jeff Garzik 8fa728a268 [SCSI] allow sleeping in ->eh_abort_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:04:55 -05:00
Andrew Vasquez a1541d5af6 [SCSI] qla2xxx: Pull-down scsi-host-addition to follow board initialization.
Return to previous held-logic of calling scsi_add_host() only
after the board has been completely initialized.  Also return
pci_*() error-codes during probe failure paths.

This also corrects an issue where only lun 0 is being scanned for
a given port.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 13:06:22 -05:00
Andrew Vasquez 18e144d32c [SCSI] qla2xxx: fix bad locking during eh_abort
Correct incorrect locking order in qla2xxx_eh_abort() handler which
would case a hang during certain code-paths.

With extra pieces to fix the irq state in the locks.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 09:37:53 -05:00
Andrew Vasquez 354d6b2196 [SCSI] remove some dead code in qla2xxx
Original from: Christoph Hellwig <hch@lst.de>

Modified and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:25 -05:00
Andrew Vasquez 1c97a12a29 [SCSI] qla2xxx: remove a transport #include
Make transport-functions structure non-static.  Replace #include of
scsi_transport.h with a forward declaration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-21 16:13:36 -04:00
6721d2c809 [PATCH] qla2xxx: remove /proc interface
Remove /proc support.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18 13:48:36 -05:00
bdf796210e [PATCH] qla2xxx: remove lun discovery codes...
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>
2005-04-18 13:47:46 -05:00
8482e118af [PATCH] qla2xxx: add remote port codes...
Add initial support for FC remote port infrastructure.

     o Use fc_remote_port...() registration and block/unlock
       functions.
     o Consolidate 'attribute' (fc-remote/sysfs) helpers into
       new qla_attr.c file.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18 13:47:19 -05:00
f4f051ebb4 [PATCH] qla2xxx: remove internal queuing...
Remove internal command queuing from the driver.  As is, this
driver cannot tolerate cable-pulls as I/Os will begin to fail
by the upper layers.

     o Should be used in conjuction with the
       11-fc_rport_adds_2.diff patch.
     o Removes qla_listops.h file -- no longer needed.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18 13:46:53 -05:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
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!
2005-04-16 15:20:36 -07:00