Commit Graph

428 Commits

Author SHA1 Message Date
Bart Van Assche
14b014edf2 nightly build: Add kernel 4.0 build infrastructure
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-04-15 14:30:34 +02:00
Bart Van Assche
cfe7b53ad3 qla2x00t: Port to RHEL 6
Although RHEL 6 is based on the 2.6.32 kernel, for RHEL 6.1 the
argument list for sysfs callback functions follows the style of
kernel 2.6.35.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-04-15 14:30:34 +02:00
Bart Van Assche
6317a4a5ee qla2x00t: Kernel 3.19 build fix
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-04-13 18:44:00 +02:00
Bart Van Assche
b0167433fb qla2x00t: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-01 06:39:16 +00:00
Bart Van Assche
356c46e018 qla2x00t: Avoid that checkpatch complains about indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-01 06:37:50 +00:00
Bart Van Assche
c32f79f6c1 Revert T10-PI support
The T10-PI patch (r6162) increases the time needed to run mkfs.ext4
over iSCSI from less than a second to several minutes. This is a
regression so revert the T10-PI patch until there is sufficient time
to find the root cause of this regression and to fix this regression.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-31 09:51:24 +00:00
Bart Van Assche
01524f59ce qla2x00t: Fix a checkpatch complaint about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-31 07:58:48 +00:00
Bart Van Assche
536cf0c473 qla2xxx_scst: Remove trailing whitespace
Detected by checkpatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-26 15:20:44 +00:00
Vladislav Bolkhovitin
ea60935622 qla2x00t: fix proc build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-26 00:02:19 +00:00
Bart Van Assche
77cc4fb7e0 Add kernel 3.19 nightly build support infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-25 20:29:50 +00:00
Vladislav Bolkhovitin
2090b6811a qla2x00t: remove detect() callback
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-25 01:00:06 +00:00
Vladislav Bolkhovitin
a788a4efd7 Newer version of QLogic target driver with 16G (26xx/83xx) support
This version is production used by SanDisk for quite some time and
passed all very hard internal tests. However, due to original qla2xxx
issues NPIV is not working in this version, so if you need NPIV either
use v3.0 of this driver or the driver from the QLogic git.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-25 00:32:39 +00:00
Vladislav Bolkhovitin
fe38e4acb2 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-19 00:01:03 +00:00
Bart Van Assche
628f3939bc scst: Rework SCSI pass-through support for kernel versions >= 2.6.30
Changes in this patch:
- Rework the SCSI pass-through code such that for kernel versions
  >= 2.6.30 the scst_exec_req_fifo patch is no longer needed.
- Modify the pass-through code such that blk_rq_append_bio() is only
  called for kernel version 2.6.30. For later kernel versions
  blk_make_request() is called instead.
- Rework scst_scsi_exec_async().
- Add debug tracing of SCSI pass-through result status.
- Add a lockdep_assert_held() call in scsi_end_async().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-20 15:04:23 +00:00
Bart Van Assche
7895216956 qla2x00t: Register for RSCNs in target mode
The QLogic firmware and qla2xxx do not register for RSCNs in
target-only mode, so do that explicitly.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-13 09:38:09 +00:00
Bart Van Assche
fec8d2459c qla2x00t: Copy entire SCST sense buffer to q2x ctio
There seems to be a bug in passing sense information to QLA HBAs, where 
the last 2 bytes of the sense data (ASC, ASCQ) are not copied to the low 
level sense buffer.
We encountered this in ESX, which relies on these 2 bytes to parse the 
MISCOMPARE sense code (0xE1, 0x1D, 0x00).
Bellow is a simple test to recreate this issue, but during vMotion 
operations (where VMs are moved from one host to another), this may 
cause the operation to fail leaving the VM in an inconsistent state.

The test I ran to verify that we are indeed missing the bytes is the 
following:
1. Create a SCST based device
2. Expose the device to 2 ESX hosts
3. Format the device as VMFS5, create a test directory
4. From both hosts, I start writing to this directory (no VMs involved, 
just write normal files)

At this stage, both ESX hosts try to take access to the directory.
The VMFS filesystem contains a per-directory lock which is managed by 
COMPARE AND WRITE command.
Each ESX will attempt to change the VMFS lock location from unlocked to 
locked to create the new file.

Obviously there are bound to be failures (which are equivalent to 
programming locking conflicts), these are reported by the MISCOMPARE 
sense code.
Upon these MISCOMPARE errors, the host will re-try taking the lock until 
it succeeds, and will then proceed to perform the write operation on the 
directory.

Due to the bug in copying the sense buffer from the SCST core to the QLA 
ctio, instead of the full sense code, only the key (0xE) is sent, and 
ESX does not know how to handle it resulting in IO error.

Here are the errors as they appear on the command line:
/vmfs/volumes/54a297c4-ca5af1cc-7f94-002219d20f28/ats_test # 
./open_close_test-esx2.sh
./open_close_test-esx2.sh: line 8: can't create 
ats_fileoptest-esx2_1.txt: Input/output error
./open_close_test-esx2.sh: line 8: can't create 
ats_fileoptest-esx2_21.txt: Input/output error
./open_close_test-esx2.sh: line 8: can't create 
ats_fileoptest-esx2_110.txt: Input/output error
./open_close_test-esx2.sh: line 8: can't create 
ats_fileoptest-esx2_111.txt: Input/output error

In the /var/log/vmkernel.log, we can see that the sense information is 
missing (0xE, 0x0, 0x0) instead of (0xE, 0x1D, 0x0).
2014-12-30T12:13:20.714Z cpu6:33519)ScsiDeviceIO: 2338: 
Cmd(0x412e84f957c0) 0x89, CmdSN 0x234d from world 519051 to dev 
"eui.0024f400d5020007" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0xe 0x0 0x0.
2014-12-30T12:13:20.766Z cpu6:33519)ScsiDeviceIO: 2338: 
Cmd(0x412e84f91d00) 0x89, CmdSN 0x2350 from world 519051 to dev 
"eui.0024f400d5020007" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0xe 0x0 0x0.
2014-12-30T12:13:20.766Z cpu6:33519)ScsiDeviceIO: 2338: 
Cmd(0x412e80449fc0) 0x89, CmdSN 0x234f from world 519051 to dev 
"eui.0024f400d5020007" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0xe 0x0 0x0.

This patch fixes this issue, the test will run without a problem with the
fix (no IO errors, all the files are properly written to the directory).

Signed-off-by: Shahar Salzman <shahar.salzman@kaminario.com>
Reviewed-by: Eran Mann <eran.mann@kaminario.com>
[bvanassche: simplified implementation]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-13 08:55:46 +00:00
Bart Van Assche
9cd602de2f Update for kernel 3.18
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 13:10:41 +00:00
Bart Van Assche
505a4dbc80 Spelling fix: existant -> existent
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 13:09:20 +00:00
Bart Van Assche
3450315283 Source code comment spelling fix: refering -> referring
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:35:51 +00:00
Bart Van Assche
dd249ab556 Spelling fix: occured -> occurred
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:35:00 +00:00
Bart Van Assche
8446d801b6 Source code comment spelling fix: explicitely -> explicitly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:32:30 +00:00
Bart Van Assche
d8ec3a3873 Source code spelling fix: authentification -> authentication
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:31:08 +00:00
Bart Van Assche
bd100d73a3 Source code spelling fix: Equivilant -> Equivalent
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:28:13 +00:00
Vladislav Bolkhovitin
94d1c2fc6c Replace in cases, where sporadic failures are possible, HARDWARE ERROR
by INTERNAL TARGET FAILURE, which is retriable (some OS'es don't retry
HARDWARE ERROR)

Reported and suggested by Shahar Salzman <shahar.salzman@kaminario.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5940 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-19 03:55:14 +00:00
Bart Van Assche
9707f85c0b Fix kernel 3.17 checkpatch warnings about 'long long unsigned'
Avoid that checkpatch reports the following warning:

WARNING: type 'long long unsigned' should be specified in 'unsigned long long' order.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-26 08:16:44 +00:00
Bart Van Assche
2fb7c084d7 Add kernel 3.17 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5883 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-26 08:05:09 +00:00
Vladislav Bolkhovitin
e13aa6622d Update for kernels 3.17.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-26 07:02:17 +00:00
Bart Van Assche
12430f9b46 nightly build: Add kernel 3.16 nightly build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-20 06:55:04 +00:00
Vladislav Bolkhovitin
bc9a96dfeb Fix Coverity warning of q2t_ctio_to_cmd() dead code
Coverity warns that 'handle == Q2T_SKIP_HANDLE' can never occur, because
code preceding the test has masked out a handle bit that would be
required for the test to succeed.

Fix that by extending Q2T_SKIP_HANDLE to incorporate
CTIO_INTERMEDIATE_HANDLE_MARK as well.

Reported-by: Steven J. Magnani <steve@digidescorp.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5718 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-20 02:24:08 +00:00
Vladislav Bolkhovitin
b6f2a47ee8 Change BUG_ON(1) into BUG()
With CONFIG_BUG=y both BUG() and BUG_ON(1) halt the system. However,
with CONFIG_BUG=n BUG() halts the system but BUG_ON(1) not. To avoid
such subtleties, change BUG_ON(1) into BUG().

See also patch Josh Triplett, "bug: Make BUG() always stop the machine",
7 April 2014 (commit ID a4b5d580e07875f9be29f62a57c67fbbdbb40ba2).

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5618 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-20 04:10:40 +00:00
Bart Van Assche
e902f79ecf kernel module installation: Skip "depmod" when building an RPM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5612 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-19 12:48:25 +00:00
Bart Van Assche
1fdd3d9a8d nightly build: Add kernel 3.15 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5611 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-19 07:09:53 +00:00
Vladislav Bolkhovitin
523fe73096 Forgotten versions updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-13 05:03:17 +00:00
Bart Van Assche
f5ab9ef30a qla2x00t: Documentation / source code comment / log messages spelling fix
Change a few occurrences of "conformation" into "confirmation". See also the
QLogic 2500 Series Firmware Interface Specification.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5555 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-27 11:59:11 +00:00
Vladislav Bolkhovitin
7d75a40089 Version changed to 3.1.0-pre1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5536 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-22 03:06:46 +00:00
Vladislav Bolkhovitin
5bbff95426 Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-02 02:50:34 +00:00
Vladislav Bolkhovitin
86db759148 SCSI logging improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-29 01:32:13 +00:00
Bart Van Assche
2b2b47bb85 nightly build: Add kernel 3.14 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5433 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-18 05:50:04 +00:00
Vladislav Bolkhovitin
243bc2afcb Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-29 01:07:22 +00:00
Bart Van Assche
a8a71bf610 Spelling fix: initator -> initiator
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 06:56:44 +00:00
Bart Van Assche
69d5b979eb Makefiles: 'uninstall' target fixes
Some components don't have 'uninstall' targets although the top-level
Makefile references them. Some others don't remove the proper file.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5290 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:41:30 +00:00
Bart Van Assche
7d89372c53 Makefiles: respect DESTDIR when specified
Not all SCST components handle DESTDIR properly, or at all.

In particular:
* INSTALL_MOD_PATH should account for DESTDIR when 'make modules_install'
  is invoked, so the kernel make infrastructure deploys the modules
  and runs depmod against the proper directory tree.
* depmods must include a '-b' option to reference the proper directory tree.
* Drop special ISCSI_DESTDIR.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:40:36 +00:00
Bart Van Assche
13e22542d1 scst, qla2x00t: Prevent inappropriate sleeping with a real-time kernel
With a realtime kernel with full preemption (CONFIG_PREEMPT_RT_FULL),
spinlocks can sleep, interrupt handlers run in thread context, and
the standard local_irq functions manipulate preemptibility, not HW
interruptibility. Under these conditions, most calls to local_irq
functions should be replaced by no-ops. The CONFIG_PREEMPT_RT patch
defines _nort versions of local_irq functions that compile away
under CONFIG_PREEMPT_RT_FULL and compile to their "normal"
equivalents otherwise.

Define _nort equivalents to support compilation against both
"normal" and RT-patched kernels, and use the _nort local_irq
functons in cases where spinlocks are taken within a
local_irq_save() or local_irq_disable() block.  Without these
changes, runtime warnings about "sleeping function called from
invalid context" occur.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Edited patch description and comment in scst_priv.h]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:31:44 +00:00
Bart Van Assche
79b8ce942e Makefiles: calculate KVER properly
When deriving the kernel version (KVER) from KDIR, the file
$(KDIR)/include/config/kernel.release should be preferred over
'make kernelversion'.

For example, the Ubuntu 3.2.0-23-generic kernel has a kernel.release
file containing '3.2.0-23-generic', but 'make kernelversion' returns
3.2.14. Since the modules are stored under /lib/modules/3.2.0-23-generic,
the value in kernel.release is the correct one to use.
    
Also:
- Evaluate KVER only once
- All depmod commands must include KVER
    
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Split long lines / removed trailing whitespace]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 15:52:10 +00:00
Bart Van Assche
e07a91e8a0 Makefiles: remove redundant 'depmod' invocations
Running 'make modules_install' already triggers invocation of depmod,
hence leave it out from those Makefiles that use 'make modules_install'.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5283 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 13:05:55 +00:00
Bart Van Assche
0a47e2e1ff qla2x00t: Re-sync help text with the code
The ql2xfdmienable module parameter defaults to 1, but the help text
claims it defaults to zero.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5267 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-06 13:38:28 +00:00
Bart Van Assche
7f1c22cbee nightly build: Add kernel 3.13 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-30 09:16:27 +00:00
Vladislav Bolkhovitin
00851a7501 Merge of adding iSER web page and copyright updates from the iSER branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 05:17:26 +00:00
Vladislav Bolkhovitin
85ea152e0c [PATCH] scst: Remove casts from INIT_DELAYED_WORK() statements
This is a source code cleanup patch that does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-22 02:57:49 +00:00
Bart Van Assche
0e99ba02b5 qla2x00t: SLES 11 SP3 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-10 07:54:10 +00:00