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
Pass length parameters in little endian format and set responder mode
if appropriate.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Disable allocation of memory for a firmware dump during module initialization
by default because it triggers DMAR faults with the IOMMU enabled.
Reported-by: Sietse van Zanen <sietse@wizdom.nu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
See also upstream commit 219d27d7147e ("scsi: qla2xxx: Fix race conditions
in the code for aborting SCSI commands").
----
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
See also upstream commit 711a08d79f71 ("scsi: qla2xxx: Change abort wait_loop
from msleep to wait_event_timeout").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since qla24xx_async_abort_cmd() is only called from inside qla_init.c,
declare that function static.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
All callbacks from the target core into the qla2xxx driver and also all I/O
completion functions are serialized per command. Since .cmd_sent_to_fw and
.trc_flags are only modified from inside these functions it is not
necessary to protect it with locking. Remove the superfluous locking.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Introduce the be_id_t and le_id_t data types for Fibre Channel source and
destination ID formats supported by the firmware instead of using an
uint8_t[3] array. Introduce functions for converting from and to the
port_id_t data types. An advantage of this patch is that it makes the
compiler verify the endianness of Fibre Channel IDs. This patch changes
the behavior of the following functions:
- qlt_abort_work(). Instead of passing the address of an uninitialized
variable to find_sess_by_s_id(), pass the S_ID.
- qlt_24xx_retry_term_exchange(). Store a little endian ID in the
initiator_id field of type 7 CTIO packets instead of a big endian ID
since other qla2xxx code also stores a little endan ID in this field.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch makes the code easier to read but does not change the behavior
of the modified code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Pass the correct session ID to find_sess_by_s_id() instead of passing
an uninitialized variable.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8327 d57e44dd-8a1f-0410-8b47-8ef2f437770f