History log of /drivers/scsi/qla2xxx/qla_mid.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
642ef983861a6a7ba41e9d7c0aa4da8f6d5af5bf 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Add ha->max_fibre_devices to keep track of the maximum number of targets.

Add a field to the qla_hw_data struct to allow us to set the maximum number of
fabric devices on a per adapter basis based on ISP type.

[jejb: fix up missing rval = QLA_SUCCESS to prevent uninit var warning]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/qla2xxx/qla_mid.c
e02587d777bfb398f70709fd3a92fa0154959003 16-Aug-2011 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.

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>
/drivers/scsi/qla2xxx/qla_mid.c
7c3df1320e5e875478775e78d01a09aee96b8abe 14-Jul-2011 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.

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>
/drivers/scsi/qla2xxx/qla_mid.c
82515920b60760bca9f66decdaa7dd98191fa47c 10-May-2011 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Allow an override of the registered maximum LUN.

The 'max_lun' value registered for each scsi_host is currently
capped at 0xffff. The new module parameter can allow for
2nd-level flat-space addressing method-infrastructure to be
supported.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
ec426e106c410b000ac590b6e776d5a6cd9bccd9 30-Mar-2011 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Log fcport state transitions when debug messages are enabled.

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>
/drivers/scsi/qla2xxx/qla_mid.c
07e264b76d1db5794614ca3d726fdf1c0399dac0 30-Mar-2011 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

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>
/drivers/scsi/qla2xxx/qla_mid.c
970ee0c52a41cf27c1b5c346dd9475e9c236f3c5 03-Sep-2010 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: make rport deletions explicit during vport removal

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
feafb7b1714cf599a6d0fed45801ab3f66046cbd 03-Sep-2010 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Fix vport delete issues

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
0c470874858e0075f420dcfb3c3570b2057de275 23-Jul-2010 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF Type 2 support

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
3dbe756a66afbec6487068d4213ecccc3a18807f 23-Jul-2010 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Cleanup some dead-code and make some functions static.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
de7c5d059dbd245ad80011725f9c86f560e61fff 23-Jul-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
3f3b6f98cb33043cba04f45a2f2c43b8303c120c 29-May-2010 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla2xxx: Do not enable VP in non fabric topology.

After topology change ISP is reset and VPs are re-enabled.
If the topology is not fabric, VPs could falsely get enabled.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/scsi/qla2xxx/qla_mid.c
a67093d46e3caed1a42d694a7de452b61db30562 04-Feb-2010 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Obtain proper host structure during response-queue processing.

Original code incorrectly assumed only status-type-0
IOCBs would be queued to the response-queue, and thus all
entries would safely reference a VHA from the IOCB
'handle.'

Cc: stable@kernel.org
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
5c66f5d193f68c2a7da0f2ad3535ed30ab14307b 16-Dec-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Fix for a multiqueue bug in CPU affinity mode

Hold the hardware lock while do the response completion in work queue threads as
it involves sharing a common request queue among multiple threads.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
3155754a6b7985a80c41d84dd06530ff543f52a8 02-Dec-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: fix for multiqueue in MISX disabled case

Fix to accommodate a hardware bug in multiqueue mode that does not
work properly when acknowledgement of MSIX Interrupts is disabled.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
531a82d1bd73152130b9e3b1f3e2e875c6cff7cd 14-Oct-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Properly re-register FC4/FDMI after physical and logical link disruptions.

Original code would not register FC4 nor FDMI information after a
logical tear-down of an VFC link. Code now triggers registration
date during processing of a 'Report ID Acquisition IOCB', which
is submitted after a FLOGI or FDISC completes.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
c7922a911c42c5a8bdee6cc75eb6bd66937d4217 28-Sep-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create

Current code attempts to clean up resources when queue create fails and there it
invokes queue free call with a (NULL) pointer to the queue which could not be
allocated in the first place. Fix it by returning directly without invoking the
queue free call as no resources has been allocated at that point of time.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
0d6e61bc6a4f3f54444b088ae6d447f1703a21dd 25-Aug-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct various NPIV issues.

* Consolidate vport-count processing.
* Correct vp_idx restrictions during RSCN processing.
* Push topology verification check to qla2x00_do_dpc_all_vps().
* Don't skip vport full-login-lip/lip-reset mailbox handling.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
ac280b670e6d6666667aba02324e2fc50bd96ae7 20-Aug-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add asynchronous-login support.

ISPs which support this feature include 23xx and above.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
4b785241ad6d07176a692631dbda3605f4917a18 01-Aug-2009 Lalit Chandivade <lalit.chandivade@qlogic.com> [SCSI] qla2xxx: Process DPC requests within valid Fabric topologies.

If vports are created and topology is changed to Loop only, the
driver continuously gets a LIP reset occurred and keeps trying to
enable the vport. Only manage requests during F_Port.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/qla2xxx/qla_mid.c
405f55712dfe464b3240d7816cc4fe4174831be2 11-Jul-2009 Alexey Dobriyan <adobriyan@gmail.com> headers: smp_lock.h redux

* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

This will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/qla2xxx/qla_mid.c
68ca949cdb04b4dc71451a999148fbc5f187a220 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [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>
/drivers/scsi/qla2xxx/qla_mid.c
2afa19a9377ca61b9489e44bf50029574fbe63be 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [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>
/drivers/scsi/qla2xxx/qla_mid.c
a5326f86ebbb153f62b0027a0f367a41f7edc1f6 24-Mar-2009 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Consolidate queuecommand implementations.

Post refactoring/multi-queue additions essentially eliminated the
need for separate ISP24XX+ queuecommand as isp_ops contains a
function pointer to the associated 'start_scsi()' operation.

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>
/drivers/scsi/qla2xxx/qla_mid.c
08029990b25b76b1bc167336358bd21812567f2a 24-Mar-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Refactor request/response-queue register handling.

Original code used an overabundance of indirect pointers to
function helpers. Instead, the driver can exploit the immutable
properties of a queue's ISP-association and ID, which are both
known at queue initialization-time.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
ee546b6e048586381462ce7bb51c7ddc03819619 05-Mar-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Correct vport delete bug.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
cf5a163127118325296c90670093b14afebb8424 09-Feb-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Correct slab-error overwrite during vport creation and deletion.

The clearing of a vha's req_ques were overrunning during vport
creation. During deletion, vport queues should be torn-down
after all cleanup has occurred.

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>
/drivers/scsi/qla2xxx/qla_mid.c
618a752319503a64d1b66615e8ea2a0e7edaf914 09-Feb-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Remove interrupt request bit check in the response processing path in multiq mode.

Correct response-queue-0 processing by instructing the firmware
to run with interrupt-handshaking disabled, similarly to what is
now done for all non-0 response queues. Since all
response-queues now run in the same mode, the driver no longer
needs the hot-path 'is-disabled-HCCR' test.

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>
/drivers/scsi/qla2xxx/qla_mid.c
29bdccbee69c199910b2b39377e66ee5c33f241c 09-Jan-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Fix ISP restart bug in multiq code

After restarting ISP the additional queues are not being setup correctly. The
following patch fixes the issue.
Please apply.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
444786d7fdd770f67e29a068ec8ee981d323f7a7 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use proper request/response queues with MQ instantiations.

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>
/drivers/scsi/qla2xxx/qla_mid.c
73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 10-Dec-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: add support for multi-queue adapter

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>
/drivers/scsi/qla2xxx/qla_mid.c
7b867cf76fbcc8d77867cbec6f509f71dce8a98f 06-Nov-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Refactor qla data structures

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>
/drivers/scsi/qla2xxx/qla_mid.c
7a8fc9b248e77a4eab0613acf30a6811799786b3 17-Aug-2008 Adrian Bunk <bunk@kernel.org> removed unused #include <linux/version.h>'s

This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/qla2xxx/qla_mid.c
c9c5ced90abc22a94c96fa7db0e29c13483a6db0 24-Jul-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Additional NPIV corrections.

Minor fixes addressing:
- rport managements during vport deletion.
- acquire proper physical-ha during qla24xx_abort_command() and
qla24xx_queuecommand()
- do not needlessly acquire the pha for non-NPIV capable ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
5de1f70f4103253f72d92da16d9618bc573b4534 11-Jul-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Correct rport/fcport visibility-state handling during loop-resync.

There were several issues here, one, during RSCN handling if a
follow-on RSCN occurred (within interrupt context) the DPC thread
could inadvertantly leave the fcport in a stale lost state.
Secondly, scheduled rport removal is handled exclusively by the
'parent' DPC thread, so wake up the proper thread. Finally,
process vport loop-resync's only when the vport has in an
"active" state (ID acquired).

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>
/drivers/scsi/qla2xxx/qla_mid.c
8f0d6436d215a2e0033ab2af192ac7e4b300bd3e 11-Jul-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Correct fcport state-management during loss.

All fcport->state management should be done within
qla2x00_mark_device_lost(), the assignment of state within
qla2x00_mark_vp_devices_dead() caused associated rports to not be
removed.

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>
/drivers/scsi/qla2xxx/qla_mid.c
711c1d916be083a5bf4fbc8e66201e7e9f8b9334 11-Jul-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Cleanup NPIV related functions

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>
/drivers/scsi/qla2xxx/qla_mid.c
08b95a12cd956e98b4a1ad5b638935dcb6c88c67 19-May-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Correct handling of AENs postings for vports.

Initialize all proper structure members in order to support
work-list vport processing. This code also properly acquires the
correct (physical hardware_lock) lock during work submission.

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>
/drivers/scsi/qla2xxx/qla_mid.c
6c2f527cb84cbd7d2d8a668c979e70bf78980ccc 13-May-2008 matthias@kaehlcke.net <matthias@kaehlcke.net> [SCSI] qla2xxx: Convert vport_sem to a mutex

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>
/drivers/scsi/qla2xxx/qla_mid.c
221726d41a6c351fd8ea7d4b11ab13085f7a8647 03-Apr-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Correct vport configuration-change handling.

Upon having configuration changes on vports only, the driver
handles SCR regardless physical port state and, in turn, it
results mailbox error as below:

Mar 20 11:24:20 dl585 kernel: qla2x00_mailbox_command(9): **** FAILED. mbx0=4005, mbx1=1, mbx2=8100, cmd=70 ****

With the changes, driver checks physical port loop_state and make
sure the port is ready to take commands.

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>
/drivers/scsi/qla2xxx/qla_mid.c
587f4cae4a8ce1315c3def2229c2a912637269b6 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Cruft cleanup of functions and structures.

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>
/drivers/scsi/qla2xxx/qla_mid.c
01e58d8eac93f3b73246b8d0bdee071d9fb85661 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
a824ebb37c1a1c5fd8e19b47bf5c14cb7b419b48 17-Jan-2008 Adrian Bunk <bunk@kernel.org> [SCSI] qla2xxx: Code cleanups.

- make the following needlessly global code static:
- qla_attr.c: qla24xx_vport_delete()
- qla_attr.c: qla24xx_vport_disable()
- qla_mid.c: qla24xx_allocate_vp_id()
- qla_mid.c: qla24xx_find_vhost_by_name()
- qla_mid.c: qla2x00_do_dpc_vp()
- qla_os.c: struct qla2x00_driver_template
- qla_os.c: qla2x00_stop_timer()
- qla_os.c: qla2x00_mem_alloc()
- qla_os.c: qla2x00_mem_free()
- qla_sup.c: qla2x00_lock_nvram_access()
- qla_sup.c: qla2x00_unlock_nvram_access()
- qla_sup.c: qla2x00_get_nvram_word()
- qla_sup.c: qla2x00_write_nvram_word()
- #if 0 the following unused global functions:
- qla_mbx.c: qla2x00_system_error()
- qla_os.c: remove some unneeded function prototypes
- removed unused functions:
- qla_dbg.c: qla2x00_dump_pkt()
- qla_mbx.c: qla2x00_get_serdes_params()
- qla_mbx.c: qla2x00_get_idma_speed()
- qla_mbx.c: qla24xx_get_vp_database()
- qla_mbx.c: qla24xx_get_vp_entry()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Small modifications and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/qla2xxx/qla_mid.c
50db6b134c31351a03cec9d2a7f9e61f63a5ce9f 17-Jan-2008 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: Add a filter to compare port_name against the physical on vport creation.

During vport creation, there was a possibility to get create a
vport with same port_name as pport. A new filter has added to
compare given port_name with the port_name of the pport.

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>
/drivers/scsi/qla2xxx/qla_mid.c
0b05a1f0d68bf4714c37aa7843c31df1866b017a 17-Jan-2008 Marcus Barrow <marcus.barrow@qlogic.com> [SCSI] qla2xxx: Use completion routines.

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>
/drivers/scsi/qla2xxx/qla_mid.c
eb66dc60be5a72bc940458a5adfd400e4d810d49 12-Nov-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct NPIV support for recent ISPs.

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>
/drivers/scsi/qla2xxx/qla_mid.c
26ff776d1dd9147eb658c55f1df42c2c232036b5 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Sparse cleanups in qla_mid.c

Make several needlessly global functions static:
- qla2x00_mark_vp_devices_dead()
- qla24xx_configure_vp()

Remove unused function qla24xx_modify_vport().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/qla2xxx/qla_mid.c
f363b9434a464e72927b468ba33cb548f482669f 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use shost_priv().

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>
/drivers/scsi/qla2xxx/qla_mid.c
2c3dfe3f6ad8daff5acdb01713e4f2b116e78136 05-Jul-2007 Seokmann Ju <seokmann.ju@qlogic.com> [SCSI] qla2xxx: add support for NPIV

Following patch adds support for NPIV (N-Port ID Virtualization) to the
qla2xxx.

- supported within switched-fabric topologies only.
- supports up to 63 virtual ports on each physical port.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
/drivers/scsi/qla2xxx/qla_mid.c