Commit Graph

218 Commits

Author SHA1 Message Date
Bart Van Assche
b2b15e1d55 scst_local: Fix a race condition
Avoid that the following crash can occur:

general protection fault: 0000 [#1] PREEMPT SMP
RIP: 0010:scsi_is_host_device+0x7/0x20 [scsi_mod]
Call Trace:
 scst_process_aens+0x95/0x1d0 [scst_local]
 scst_aen_work_fn+0x6f/0x120 [scst_local]
 process_one_work+0x20b/0x6c0
 worker_thread+0x4e/0x4a0
 kthread+0x113/0x150
 ret_from_fork+0x31/0x40


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7185 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:56:09 +00:00
Vladislav Bolkhovitin
68fa7e1a0d Copyright updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:19:52 +00:00
Vladislav Bolkhovitin
9ed7b217e3 generate-kernel-patch: optimize generation of Makefile for scst_local
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7028 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-11-17 05:24:07 +00:00
Vladislav Bolkhovitin
69863eb497 Increase version to 3.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6927 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:32:17 +00:00
Vladislav Bolkhovitin
528f5e0004 Makefiles/Kconfigs for kernels 4.5 and 4.6
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-25 00:56:09 +00:00
Bart Van Assche
30c98e92cd scst_local: Address checkpatch warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-03-27 16:57:04 +00:00
Vladislav Bolkhovitin
fa2f54ac9e Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-22 04:04:43 +00:00
Bart Van Assche
120e5fb78b nightly build: Add kernel 4.4 support files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-19 18:08:04 +00:00
Bart Van Assche
ce479e0b01 scst_local: Linux kernel v4.4 build fix
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
[ bvanassche: Merged the two #if-statements into a single #if-statement ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6707 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-20 21:47:57 +00:00
Bart Van Assche
fecfbad5b7 scst, scst_local: Remove strict_strto*() calls
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6641 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 21:30:36 +00:00
Bart Van Assche
e5bbd925fc scst_local: Insert a blank line after declarations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 23:23:38 +00:00
Bart Van Assche
999240bcd6 scst_local: Place constants at the right-hand-side in comparisons
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6609 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 18:55:03 +00:00
Vladislav Bolkhovitin
5f7ac7f4bf Version updated to 3.2.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 06:17:17 +00:00
Bart Van Assche
fc27595d07 nightly build: Add support files for kernel v4.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-03 05:24:37 +00:00
Bart Van Assche
4a3ba74b67 scst_local, procfs: Kernel v4.3 build fix.
See also patch "fs/seq_file: convert int seq_vprint/seq_printf/etc...
returns to void" (commit ID 6798a8caaf64fa68b9ab2044e070fe4545034e03).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6561 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-10-28 20:39:04 +00:00
Bart Van Assche
b85e99da68 nightly build: Add kernel v4.2 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 14:00:26 +00:00
Vladislav Bolkhovitin
45d7f40ec1 Improve release logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 02:57:51 +00:00
Bart Van Assche
2e07fca500 nightly build: Add kernel v4.1 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-28 15:45:59 +00:00
Bart Van Assche
ac45265fd0 scst_local: Fix scst_local_add_target() error path
Do not return a pointer to freed memory in *out_tgt. Detected by
Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 23:45:15 +00:00
Bart Van Assche
1eb5498df2 scst_local: Correct error handling in scst_local_sysfs_mgmt_cmd()
Avoid that __scst_local_add_adapter() failures are ignored.
Detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 23:44:28 +00:00
Bart Van Assche
f148075207 nightly build: Add kernel 4.0 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6225 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-09 13:34:22 +00:00
Vladislav Bolkhovitin
572869d64a scst_local: Kernel 3.19 build fix
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-26 00:06:51 +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
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
Vladislav Bolkhovitin
4ac6d7a26d [PATCH] scst: Drop detect() method
There is no need for a detect() method - code that is present in such
a method can be moved to module_init(). Hence declare this method
obsolete. Leave the detect pointer member in the target template for
now for out-of-tree SCST drivers.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

with some improvements



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-21 04:32:36 +00:00
Vladislav Bolkhovitin
18ec809a45 scst_local: Rework data direction detection code
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-24 05:37:57 +00:00
Vladislav Bolkhovitin
ca87894980 [PATCH] scst_local: Fix bidirectional command support
scsi_setup_cmnd() sets sc_data_direction to DMA_TO_DEVICE for bidirectional
commands. Hence test SCpnt->request->next_rq instead of sc_data_direction
to figure out whether or not a command is bidirectional.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5984 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-22 05:03:17 +00:00
Bart Van Assche
292f72e16d scst_local: Fix unique per session sas address
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5960 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-07 09:20:06 +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
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
Bart Van Assche
daa3c9a075 scst_local: Restore support for detecting LUN 16383 via a sequential scan
Reported-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5820 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-30 11:07:38 +00:00
Bart Van Assche
173fdd5f20 scst_local: Set max_id to 1
The value 0 is not valid for the max_id member of struct Scsi_Host.
    
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5786 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-09 11:27:27 +00:00
Bart Van Assche
2452405735 scst_local: Change max_lun into SCST_MAX_LUN (16383)
Today SCST does not support LUN numbers >= 16384. Additionally,
there is a bug in older Linux initiator systems that prevents
proper handling of LUN numbers >= 2**32. See also Hannes Reinecke,
scsi_scan: Fixup scsilun_to_int(), June 25, 2014 (commit ID
d9e5d6183715e691b37afd3785c311d05cd1338d). Hence set max_lun to
16383.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-09 11:09:20 +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
Bart Van Assche
2ab81dfa2e scst_local: Avoid that session deletion triggers a kernel warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5631 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-28 20:15:45 +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
14f4e35b64 scst_local: Add close_session() callback function
This is useful for triggering the session reassignment code via
the scst_local driver.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-13 22:31:42 +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
Vladislav Bolkhovitin
a2feffdcfe scst_local: Support LUN numbers >= 16384
Add support for 32-bit LUN numbers. As soon as the patches that add
64-bit LUN support are upstream this patch will also make 64-bit
LUN support available in scst_local.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 21:00:16 +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
eae78fb98c scst_local: Remove two superfluous tests
The to_scst_lcl_sess() macro is based on container_of() and hence never
returns NULL. Hence remove the two tests that compare the result of that
macro against NULL.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:20:04 +00:00
Bart Van Assche
93b4c863dc scst_local: Add newline to sysfs output
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
[bvanassche: Reduced source code line length to 80 columns]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 07:39:45 +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
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
cf699a6d95 scst_local: Fix a kernel oops for kernel versions < 2.6.37
Avoid that scst_local triggers "BUG: unable to handle kernel NULL
pointer dereference" on kernel versions before 2.6.37. This patch
fixes a regression introduced via patch "scst_local: Avoid
deadlock during module removal with kernel 3.6" (trunk r4566).

Reported-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-06 12:46:51 +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
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