Commit Graph
390 Commits
Author SHA1 Message Date
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
Bart Van Assche f5a8248cb7 nightly build: Add kernel 3.12 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-19 08:07:15 +00:00
Vladislav Bolkhovitin 27c21ff385 qla2x00t: Update and refine howto
Some users think these instructions are not valid for Linux 3.x kernels
since there are examples in this document referring to a 2.6.x kernel.
Hence update the examples.

Explain how to discover initiator port WWNs since this is nontrivial for
novice users.

Update the SourceForge SVN SCST URL since it changed a few months ago.

Move the qla2xxx module unload step to after the system reboot. Performing
that step after the reboot even though that module has already been
blacklisted is necessary because at that time initrd has not yet been
rebuilt and hence a reboot can cause that module to be reloaded from initrd.

The steps for building and installing SCST itself have been reduced from
four commands into a single command.

The sample scst.conf file is now generated - local FC port WWNs are
discovered automatically.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-22 05:43:47 +00:00
Vladislav Bolkhovitin 7fd3d9da4e Relax this FW overload message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-04 04:52:26 +00:00
Vladislav Bolkhovitin 7502f47dad Fix small possible race in sessions management
In q2t_del_sess_work_fn() session can get ready to be destroyed before
hardware_lock is taken

From Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-04 02:17:43 +00:00
Vladislav Bolkhovitin 1342a944db Fix recently discovered races in sessions management
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5018 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-03 04:24:39 +00:00
Bart Van Assche dad77aead4 nightly build: Add kernel 3.11 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5006 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 16:04:47 +00:00
Vladislav Bolkhovitin e3b9d00d97 qla2x00t: Simplify q2t_create_sess()
Replace a kmalloc() and sprintf() call by a kasprintf() call. This
patch 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@4998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-11 22:44:04 +00:00
Bart Van Assche b103dd9949 qla2x00t: Fix q2t_close_session()
The "force_close" sysfs attribute remains to exist for some time
after q2t_close_session() finished. Avoid that q2t_close_session()
invokes q2t_sess_put() more than once by removing a session from
the session list before returning. Avoid that that disabling a
target after q2t_close_session() has been invoked triggers a call
of q2t_sess_put(). Avoid that triggering the "force_close" sysfs
attribute after a target has been disabled triggers an additional
call of q2t_sess_put().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-09 16:19:56 +00:00
Bart Van Assche 89e96c6495 nightly build: Add kernel 3.10 support infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-22 18:35:37 +00:00
Vladislav Bolkhovitin 6e31fd8306 Relax and cleanup HARDWARE ERROR sense usage
HARDWARE ERROR sense is very strong considered be "internal failure", so
might lead to serios initiator side issues up to disconnect from device. In
many cases WRITE or READ ERROR sense can be used instead. All remaining
usages must be logged.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-04 02:46:49 +00:00
Bart Van Assche 11fdb1bf29 nightly build: Add kernel 3.9 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 16:04:24 +00:00
Vladislav Bolkhovitin 2093dd7561 Make it possible to forcibly close SRP and FC sessions via sysfs
That patch contains the following changes:
* Move the code for creating a "close_sess" sysfs attribute from iscsi-scst to
  the SCST core such that it becomes available for other target drivers. This
  does not change the functionality of iscsi-scst.
* Add code in ib_srpt and qla2x00t to allow a session to be forcibly closed from
  user space.

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




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 00:52:46 +00:00
Vladislav Bolkhovitin 4ce549b875 qla2x00t: Avoid dereferencing a NULL pointer
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4843 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-27 05:11:17 +00:00
Vladislav Bolkhovitin 0339bb8905 This change causes "make -C <dir> clean" to work. Also, use SUBDIRS=...
instead of M=... because of consistency with the rest of the Makefile.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-29 01:19:24 +00:00
Vladislav Bolkhovitin ef5fe3dcd0 Correct sg_next_inline() misuse.
Previously sg_next_inline() didn't check if this sg is last.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4822 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 01:12:02 +00:00
Vladislav Bolkhovitin e38c450819 sess and tgt structures are read-mostly, so don't need cache alignment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4816 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 21:34:53 +00:00
Vladislav Bolkhovitin 2cadcc2c64 Cache alignment review
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4809 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-23 01:38:31 +00:00
Vladislav Bolkhovitin 65ada2c9f0 Fix crash if on 24xx+ handle can't be translated to cmd
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-19 23:49:56 +00:00
Vladislav Bolkhovitin 369863f015 Allow install SCST in any location
Currently the install location of SCST is pretty much hard coded into 
the Makefiles to be /usr/local.

I am custom building a system for ZFS & SCST and I want to install in 
/usr instead of /usr/local.

Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.

This patch fixes it.

From Sietse van Zanen <sietse@wizdom.nu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:25:45 +00:00
Vladislav Bolkhovitin b9c0b9d92d Another micro-optimization: cache align all fast path structures
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 23:51:16 +00:00
Vladislav Bolkhovitin ae8e9ef049 Micro-optimization: allow target drivers to prealloc scst_cmd + update qla2x00t to use this facility
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 00:52:26 +00:00
Vladislav Bolkhovitin a0ee2a2396 qla2x00t: Clean up DMA address computation code
The expression "sg_dma_address(prm->sg)" occurs several times in several
pieces of code that compute a DMA address. Make these pieces of code
somewhat easier to read by storing the DMA address in a temporary variable
called "dma_addr".

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4778 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 20:29:11 +00:00
Bart Van Assche 52f0d63ee6 nightly build: Add kernel 3.8 support files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4769 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 13:47:51 +00:00
Vladislav Bolkhovitin 79bf4e77c6 Update for 3.8 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4768 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 00:44:56 +00:00
Vladislav Bolkhovitin 10ca1d2f20 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 02:05:29 +00:00
Vladislav Bolkhovitin a98e10a13f Make qla2x00t support sg-chaining
Suggested by Nikolai Kopanygin <nikolai.kopanygin@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4760 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:55:11 +00:00
Vladislav Bolkhovitin cd32115d6c Patch from Lukasz Jurewicz <lukasz.jurewicz@gmail.com> updating URL to QLogic firmware
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:23:32 +00:00
Vladislav Bolkhovitin ebc43696ff Backport mainline commit a55aac79de0ea6fc52d35f535867b6573a5ff0f8:
[SCSI] qla2xxx: Propagate up abort failures



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4754 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-05 00:05:54 +00:00
Vladislav Bolkhovitin b3908d7447 Wrong task attribute isn't error, so warning message should be issued instead
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4753 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-04 23:55:34 +00:00
Vladislav Bolkhovitin 92a296b9e5 qla2x00t: Avoid that an SRR for a command without data triggers a kernel oops
Avoid that the following kernel oops is triggered as the result of
cable pulling:

------------[ cut here ]------------
kernel BUG at /usr/src/linux-3.0.51-0.7.9/include/asm-generic/dma-mapping-common.h:51!
invalid opcode: 0000 [#1] SMP
CPU 0

Pid: 5791, comm: kworker/0:1 Tainted: P           N
3.0.51-0.7.9-default #1 HP ProLiant DL380p Gen8
RIP: 0010:[<ffffffffa03312a7>]  [<ffffffffa03312a7>]
q2t_pci_map_calc_cnt+0x87/0x120 [qla2x00tgt]
RSP: 0018:ffff8807ad879cf0  EFLAGS: 00010202
RAX: ffff880fbfa00960 RBX: 0000000000000009 RCX: ffff880fbfa00960
RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffff880fbfa00960
RBP: ffff8807ad879d40 R08: 0000000000000000 R09: dead000000200200
R10: dead000000100100 R11: ffffffff81020000 R12: ffffffff81a13880
R13: 0000000000000009 R14: ffff88100f172090 R15: ffff880fbfa00840
FS:  0000000000000000(0000) GS:ffff88083fa00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f74cf266020 CR3: 0000000001a03000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/0:1 (pid: 5791, threadinfo ffff8807ad878000, task
ffff88074ae801c0)
Stack:
 0000000300000000 ffff88100eb18670 00000000ffffffff ffff88100eb18670
 ffff8807ad879d40 ffff880744b331c8 ffff88080673ca00 ffffffffa03348bc
 0000000000000000 0000000000000000 ffff880744b331c8 ffff88080673ca00
Call Trace:
 [<ffffffffa03348bc>] __q2t_rdy_to_xfer+0x8c/0x1c0 [qla2x00tgt]
 [<ffffffffa033672d>] q2t_handle_srr_work+0x1ed/0x210 [qla2x00tgt]
 [<ffffffff810743cc>] process_one_work+0x16c/0x350
 [<ffffffff81076eba>] worker_thread+0x17a/0x410
 [<ffffffff8107b1e6>] kthread+0x96/0xa0
 [<ffffffff8144db44>] kernel_thread_helper+0x4/0x10
Code: 4d 85 e4 0f 84 a8 00 00 00 45 85 ed 7e 16 4c 89 ff 31 db 90 83
c3 01 e8 58 2b f2 e0 41 39 dd 48 89 c7 7f f0 83 7c 24 04 02 76 04 <0f>
0b eb fe 45 31 c0 8b 4c 24 04 44 89 ea 4c 89 fe 4c 89 f7 41
RIP  [<ffffffffa03312a7>] q2t_pci_map_calc_cnt+0x87/0x120 [qla2x00tgt]
 RSP <ffff8807ad879cf0>
---[ end trace e93624bd6aa42d19 ]---

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4747 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-25 01:20:37 +00:00
Vladislav Bolkhovitin bd7c893f04 Multiple makefiles: autodetect SCST include directory
It is cumbersome to change SCST_INC_DIR and SCST_DIR in each Makefile
before and after a release. Hence modify the Makefiles such that these
paths are detected automatically.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:12:38 +00:00
Vladislav Bolkhovitin e7e9101efd Automate release archive generation
This patch makes it easier to generate the release archives that
can be downloaded from http://scst.sourceforge.net/downloads.html.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-04 00:29:30 +00:00
Bart Van Assche 12313bf114 nightly build: Add kernel 3.7 patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 08:54:50 +00:00
Vladislav Bolkhovitin d178fa8da9 qla2x00t: Avoid reading uninitialized memory
Reported-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4644 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-13 21:28:10 +00:00
Vladislav Bolkhovitin ed9ac5b9de Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4640 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-11 02:57:16 +00:00
Vladislav Bolkhovitin 0bf88c8f96 Let's do attributes creation in a generic way
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4638 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-04 01:43:22 +00:00
Vladislav Bolkhovitin eb0fcbb1ef Explicit confirmations and abort ISP attributes don't make sense on virtual targets
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4637 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-03 23:29:36 +00:00
Bart Van Assche d3dc18dacb qla2x00t: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-08 10:46:34 +00:00