Currently the FC-NVMe driver is leveraging the SCSI FC transport class to
access the remote ports. Which means that all FC-NVMe remote ports will be
visible to the fc transport layer, but due to missing definitions the port
roles will always be 'unknown'. This patch adds the missing definitions to
the fc transport class to that the port roles are correctly displayed.
Signed-off-by: Hannes Reinecke <hare@suse.de>
[ bvanassche: Ported this patch to SCST ]
See also upstream commit a6a6d0589ac4 ("scsi: scsi_transport_fc: nvme:
display FC-NVMe port roles") # v5.2-rc1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the following error is reported when building SCST against
a Linux kernel older than v4.18 combined with MOFED >= 4.5:
scst/include/backport.h:910:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^
In file included from ./include/linux/highmem.h:8:0,
from ./include/linux/bio.h:21,
from ./scst/include/backport.h:24,
from ./scst/include/scst_debug.h:42,
from isert-scst/isert_dbg.h:29,
from isert-scst/iser_global.c:40:
/usr/src/ofa_kernel/default/include/linux/mm.h:78:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
[bvanassche: renamed MOFED_*_VERSION INTO MOFED_*]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
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