8786 Commits

Author SHA1 Message Date
Bart Van Assche
b4a3564f34 qla2xxx-32gbit: Avoid that qla2x00_mem_free() crashes if called twice
Clear each pointer after having freed memory such that it becomes safe to
call qla2x00_mem_free() twice.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8295 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:40:15 +00:00
Bart Van Assche
e83ea77222 qla2xxx-32gbit: Make qla2x00_mem_free() easier to verify
Instead of clearing all freed pointers at the end of qla2x00_mem_free(),
clear freed pointers immediately after having freed the memory these
pointers point at.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:39:39 +00:00
Bart Van Assche
bfeb9ad911 qla2xxx-32gbit: Increase the size of the mailbox arrays from 4 to 8
This patch avoids that Coverity complains that qla2x00_async_event() writes
outside the bounds of the mb[] arrays (MBA_IDC_AEN case).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8293 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:38:41 +00:00
Bart Van Assche
6697b57398 qla2xxx-32gbit: Avoid that Coverity complains about dereferencing a NULL rport pointer
Since Coverity cannot know that rport != NULL in qla2xxx_queuecommand() and
since there is code in that function that dereferences the rport pointer,
modify qla2xxx_queuecommand() such that it fails SCSI commands if rport ==
NULL.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8292 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:37:52 +00:00
Bart Van Assche
ff552bdfa7 qla2xxx-32gbit: Remove the fcport test from qla_nvme_abort_work()
Testing whether a pointer is not NULL after it has been dereferenced is not
useful. Hence remove the if (fcport) test. This was detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8291 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:37:22 +00:00
Bart Van Assche
d5a19f6c1c qla2xxx-32gbit: Uninline qla2x00_init_timer()
Since qla2x00_init_timer() is not used for I/O commands there is no need to
inline this function. Hence uninline this function.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8290 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:34:07 +00:00
Bart Van Assche
ae6d50582f qla2xxx-32gbit: Move qla2x00_is_reserved_id() from qla_inline.h into qla_init.c
The previous patch moved all qla2x00_is_reserved_id() callers into
qla_init.c. Hence also move the qla2x00_is_reserved_id() definition into
qla_init.c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:29:36 +00:00
Bart Van Assche
993f07b74f qla2xxx-32gbit: Move qla2x00_clear_loop_id() from qla_inline.h into qla_init.c
Since qla2x00_clear_loop_id() is not in the hot path, uninline it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:29:02 +00:00
Bart Van Assche
0e50ffda1a qla2xxx-32gbit: Remove a set-but-not-used variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8287 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:28:18 +00:00
Bart Van Assche
f76b3147ab qla2xxx-32gbit: Declare qla2x00_find_new_loop_id() static
Since all qla2x00_find_new_loop_id() calls occur in the same source file as
the definition of this function, move that function to just before its
first caller and declare it static. Convert the header above this function
into kernel-doc format.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:26:16 +00:00
Bart Van Assche
58b24c2734 qla2xxx-32gbit: Move qla2x00_set_reserved_loop_ids() definition
Since qla2x00_set_reserved_loop_ids() only has a single caller, move it
into the source file from where it is called.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8285 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:25:26 +00:00
Bart Van Assche
bc06224388 qla2xxx-32gbit: Update a source code comments
Change one occurrence of "*(" into "()". Fix the reference to
qla_tgt_handle_cmd_for_atio(): there has never been a function with
that name.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:23:47 +00:00
Bart Van Assche
255131ab50 Merge branch 'svn-trunk' 2019-04-27 07:52:28 -07:00
Bart Van Assche
15bc114ea6 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-27 14:52:21 +00:00
Bart Van Assche
647a4414af Merge branch 'svn-trunk' 2019-04-23 18:46:05 -07:00
Bart Van Assche
dd2f349de4 qla2x00t-32gbit, target: Do not submit the NEXUS LOSS task management function when freeing a session
Submitting the NEXUS LOSS task management function is not required when
freeing an SCST session.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-24 01:45:46 +00:00
Bart Van Assche
dca2301b6a qla2x00t-32gbit: Fix qla24xx_abort_sp_done()
Avoid that the complete() and sp->free() calls are ignored if aborting
a command times out.

Reported-by: Shen Qiyu <shenqiyu@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8275 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-24 01:44:26 +00:00
Bart Van Assche
383c433f2b Merge branch 'svn-trunk' 2019-04-23 18:37:52 -07:00
Bart Van Assche
b8b7736187 qla2xxx-32gbit: Silence Sucessful ELS IOCB message
ELS IOCB done message should be moved to verbose logging
to prevent confusion about the error case v/s sucessful
submission case.

Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8274 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-24 01:37:38 +00:00
Bart Van Assche
70a4e33a7f qla2xxx-32gbit: Fix device staying in blocked state
From: Quinn Tran <qtran@marvell.com>

This patch fixes issue reported by some of the customers,
who discovered that after cable pull scenario the devices
disappear and path seems to remain in blocked state. Once
the device reappears, driver does not seem to update path
to online. This issue appears because of the defer flag
creating race condition where the same session reappears.
This patch fixes this issue by indicating SCSI-ML of device
lost when qlt_free_session_done() is called from qlt_unreg_sess().

Fixes: "qla2xxx: Improve RSCN handling in driver"
Signed-off-by: Quinn Tran <qtran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8273 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-24 01:36:44 +00:00
Bart Van Assche
84141a0756 Merge branch 'svn-trunk' 2019-04-23 18:26:18 -07:00
Bart Van Assche
33f2f4a064 Makefiles: Only read the build_mode file if building inside the SCST tree
This patch avoids that the build_mode file is read when applying the
generate-kernel-patch output to the kernel tree and when building the
kernel tree.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-23 17:11:26 +00:00
Bart Van Assche
7a399b085d Merge branch 'svn-trunk' 2019-04-22 18:01:21 -07:00
Bart Van Assche
74354ff7f0 scst: Fix the build against Ubuntu kernel 4.15.0
Reported-by: Tomohiro Kusumi


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8271 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-23 01:00:43 +00:00
Bart Van Assche
19b532cfad Merge branch 'svn-trunk' 2019-04-21 20:52:21 -07:00
Bart Van Assche
9c19181cca nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8270 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-22 03:52:03 +00:00
Bart Van Assche
569f96aa94 Merge branch 'svn-trunk' 2019-04-21 12:17:03 -07:00
Bart Van Assche
9b37ec66b4 usr/fileio/common.c: Fix a compiler warning
Avoid that the compiler complains that the assert() expression compares a
signed with an unsigned integer.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 19:13:35 +00:00
Bart Van Assche
c02215e725 Merge branch 'svn-trunk' 2019-04-21 12:05:30 -07:00
Bart Van Assche
a61b47415c scst: Make scst_unregister_target() show which sessions it is waiting for
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8268 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 19:05:28 +00:00
Bart Van Assche
4474209781 scst: Remove disabled code from scst_unregister_target()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8267 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 19:03:53 +00:00
Bart Van Assche
ec957edd8e Merge branch 'svn-trunk' 2019-04-21 11:58:45 -07:00
Bart Van Assche
7556420a31 scst/README: Make the description of the async flag more clear
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8266 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 18:34:26 +00:00
Bart Van Assche
20a3664581 Merge branch 'svn-trunk' 2019-04-21 07:58:48 -07:00
Bart Van Assche
61ab007c04 qla2x00t-32gbit, target: Inline a single-line function
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8265 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 14:58:41 +00:00
Bart Van Assche
78938fde8e Merge branch 'svn-trunk' 2019-04-21 07:57:59 -07:00
Bart Van Assche
f42279201b qla2x00t-32gbit, target: Remove more superfluous casts
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 14:57:34 +00:00
Bart Van Assche
475dafd3c2 qla2x00t-32gbit: Fix formatting of a port name in qla2x00_reg_remote_port()
Fixes: d20be1897c / r8166 ("qla2x00t-32gbit: Avoid using the format specifier %*phC")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8263 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 14:56:58 +00:00
Bart Van Assche
332b9de175 qla2x00t-32gbit, target: Fix sqa_qla2xxx_check_initiator_node_acl()
Fixes: 3e0dbd0756 / r8245 ("qla2x00t-32gbit, target: Fix a memory leak in an error path")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8262 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-21 14:54:28 +00:00
Bart Van Assche
6ac9522589 Merge branch 'svn-trunk' 2019-04-20 16:51:52 -07:00
Bart Van Assche
caea963fca scst: Fix scst_readv() and scst_writev()
Fixes: a94c8eaf0f ("scst: Move the set_fs() calls into scst_{read,write}v()").
See also trunk r8066.

Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8261 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 23:50:50 +00:00
Bart Van Assche
62200613d1 qla_isp: Remove this driver
This driver is obsolete and is no longer supported since a long time, so
remove it. From the README of this driver (this note was added in 2009):
"From other side, qla2x00t is simpler, smaller and much better tested
on 22xx and 23xx, hence perform more reliable and, thus, is recommended
for these adapters. Since 24xx/25xx become fully supported on qla2x00t
we encourage users to switch to this driver."


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8260 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 23:34:32 +00:00
Bart Van Assche
f2552d2e28 Merge branch 'svn-trunk' 2019-04-20 09:39:20 -07:00
Bart Van Assche
01e8d4aadd iscsi-scst, isert-scst: Make this driver build against RHEL 8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 16:38:51 +00:00
Bart Van Assche
09320f0f4d qla2x00t-32gbit, target: Minimize #include directives
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8258 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 16:37:39 +00:00
Bart Van Assche
845611b921 Merge branch 'svn-trunk' 2019-04-20 08:56:07 -07:00
Bart Van Assche
07e936a256 usr/fileio/common.c: Suppress a compiler warning
Avoid that gcc 8 complains about the strncpy() call.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8257 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 15:53:53 +00:00
Bart Van Assche
3002ba7652 usr/stpgd: Fix the perf build
Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8256 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 15:53:06 +00:00
Bart Van Assche
88d4bc5653 qla2x00t-32gbit, target: Update README file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-20 15:52:09 +00:00
Bart Van Assche
d97a577a6b Merge branch 'svn-trunk' 2019-04-17 18:53:20 -07:00