When building against Oracle Linux + MOFED the build fails unless if
DTrace is disabled. Hence disable DTrace for the isert-scst module if
MOFED is detected.
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
[ bvanassche: Left out one empty OFED_CONFIG assignment ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Use grep to check whether or not 'git tag' succeeded since the exit status
of 'git tag' is always zero.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since qlt_remove_target() only calls qlt_release() if
vha->vha_tgt.qla_tgt != NULL, checking that pointer inside qlt_release()
is not necessary. This patch avoids that Coverity reports the following:
CID 188348 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer &vha->vha_tgt.qla_tgt->tgt_list_entry
to list_del, which dereferences it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Return a QLA_* status code instead of returning a pointer. This patch does
not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that Coverity complains that the return value of
qla2x00_wait_for_hba_online() is not always checked.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that Coverity reports the following:
Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression dma_eng_num *
65536U with type unsigned int (32 bits, unsigned) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression of type
uint64_t (64 bits, unsigned).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8379 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Set the r??_data_len variables before using these instead of after.
This patch avoids that Coverity reports the following:
const: At condition req_data_len != rsp_data_len, the value of req_data_len must be equal to 0.
const: At condition req_data_len != rsp_data_len, the value of rsp_data_len must be equal to 0.
dead_error_condition: The condition req_data_len != rsp_data_len cannot be true.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that Coverity reports the following:
Unchecked return value (CHECKED_RETURN)34. check_return: Calling
atomic_read without checking return value (as is done elsewhere 80 out
of 92 times).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8376 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since sess == NULL before 'goto out_term2' is executed, the code under
'if (sess)' cannot be reached. Hence remove that code. This was detected
by Coverity.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Checking a pointer after it has been dereferenced is not useful. This was
detected by Coverity.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8374 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that Coverity reports the following:
Unchecked return value (CHECKED_RETURN)16. check_return: Calling
wait_for_completion_timeout without checking return value (as is done
elsewhere 14 out of 17 times).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8372 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that Coverity reports the following:
Null-checking sp->u.iocb_cmd.u.ctarg.rsp suggests that it may be null, but
it has already been dereferenced on all paths leading to the check.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that Coverity complains (incorrectly) that there is a memory leak
in an error path in scst_block_generic_dev_done().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch avoids that sparse complains about local symbols not having been
declared 'static'.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
During EEH error recovery testing it was discovered that driver's reset()
callback partially frees resources used by driver, leaving some stale
memory. After reset() is done and when resume() callback in driver uses
old data which results into error leaving adapter disabled due to PCIe
error.
This patch does cleanup for EEH recovery code path and prevents adapter
from getting disabled.
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ bvanassche: Ported from upstream kernel to SCST ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Use the same approach for encoding the destination ID as the approach
used by qlt_update_vp_map().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f