Commit Graph

6221 Commits

Author SHA1 Message Date
Bart Van Assche
3a3de2bc20 qla2x00t-32gbit: Complain if a mailbox command times out
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
2019-05-27 17:36:17 +00:00
Bart Van Assche
29bc124020 qla2x00t-32gbit: Remove two superfluous if-tests
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
2019-05-27 17:34:47 +00:00
Bart Van Assche
3560f6650a qla2x00t-32gbit: Change data_dsd into an array
This patch avoids that Coverity complains about using a scalar as an array.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-27 17:33:20 +00:00
Bart Van Assche
81bc0e717a iscsi-scst: Suppress a false positive Coverity complaint
Avoid that Coverity complains about using a scalar as an array.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-27 17:31:40 +00:00
Bart Van Assche
c5d4686660 scst_lib: Add a scst_put_buf_full() call in scst_block_generic_dev_done()
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
2019-05-27 17:28:50 +00:00
Bart Van Assche
dc78c5025e qla2x00t-32gbit: Declare local symbols 'static'
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
2019-05-27 17:27:47 +00:00
Bart Van Assche
ed72c37437 qla2x00t-32gbit: Use strlcpy() instead of strncpy()
This patch avoids that gcc complains that the output may be truncated.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-26 16:57:59 +00:00
Bart Van Assche
dff864f63e qla2x00t-32gbit: Add cleanup for PCI EEH recovery
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
2019-05-26 16:51:26 +00:00
Bart Van Assche
9f3248f224 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-26 12:02:04 +00:00
Bart Van Assche
e2818b97f0 scst/Makefile: Avoid that "nothing to do" is reported when running e.g. make 2perf
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-16 16:30:48 +00:00
Bart Van Assche
86b2b49ade scripts/kernel-functions: Fetch both Linus' tree and the stable tree
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-16 16:30:08 +00:00
Bart Van Assche
b0991f6043 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8361 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-11 01:27:54 +00:00
Bart Van Assche
8ae4d56ad7 usr/fileio/common.c: Annotate a switch/case fall-through
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8360 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:48:18 +00:00
Bart Van Assche
11bbb0b613 qla2x00t-32gbit: Improve coding style conformance
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:30:57 +00:00
Bart Van Assche
e851438472 qla2x00t: Improve coding style conformance
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8358 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:29:24 +00:00
Bart Van Assche
b350c846f1 scst/src/scst_sysfs: Improve coding style conformance
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:27:41 +00:00
Bart Van Assche
e945943861 iscsi-scst/usr: Improve coding style
This patch only affects code formatting and does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:26:46 +00:00
Bart Van Assche
370e25813e usr/fileio: Make the coding style more consistent
This patch only changes whitespace.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-09 16:25:29 +00:00
Bart Van Assche
005eec88bd nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-08 13:52:23 +00:00
Bart Van Assche
38f211de97 qla2x00t-32gbit, target: Make the use of whitespace conform the Linux kernel coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-07 02:46:22 +00:00
Bart Van Assche
3ab9bc61b7 qla2x00t-32gbit: Make the pointer notation conform with the Linux kernel coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-07 02:41:22 +00:00
Bart Van Assche
0ed0d35395 qla2x00t-32gbit: Fix PRLI and PLOGI handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-06 01:47:21 +00:00
Bart Van Assche
86f828d714 qla2x00t-32gbit: Rework key encoding in qlt_find_host_by_d_id()
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
2019-05-06 00:42:19 +00:00
Bart Van Assche
c8d12894cf scst/Makefile: Remove a debug statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:24:18 +00:00
Bart Van Assche
9add6c3983 Update Subversion ignore files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:22:21 +00:00
Bart Van Assche
22f1132073 Makefiles: Rework build mode switching
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
2019-05-05 18:19:38 +00:00
Bart Van Assche
d973bda70a srpt/conftest/rdma_destroy_ah_with_flags: Update Subversion ignore list
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 16:55:52 +00:00
Bart Van Assche
058cf8834a scst_vdisk: Make a warning message more clear
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 16:03:10 +00:00
Bart Van Assche
b56d9ce600 scst_vdisk: Suggest to disable thin provisioning for ZFS
Apparently ZFS does not support FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE.
Hence suggest to disable thin provisioning if fallocate() returns -EOPNOTSUPP.
See also https://github.com/zfsonlinux/zfs/issues/326.

Reported-by: Sietse van Zanen <sietse@wizdom.nu>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 15:59:00 +00:00
Bart Van Assche
47d3ba1f99 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 14:23:18 +00:00
Bart Van Assche
609bd271c4 qla2x00t-32gbit: Submit ELS pass-through IOCBs in the proper format
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
2019-05-05 02:34:08 +00:00
Bart Van Assche
0841504028 qla2x00t-32gbit: Simplify qlt_lport_dump()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 02:25:50 +00:00
Bart Van Assche
606d65a1c0 qla2x00t-32gbit: Disable ql2xallocfwdump by default
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
2019-05-05 02:05:46 +00:00
Bart Van Assche
fb23a4f8c1 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 14:24:54 +00:00
Bart Van Assche
0277a113c4 qla2x00t-32gbit: Fix another race related to aborting commands
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
2019-05-04 03:11:59 +00:00
Bart Van Assche
6c9dddf26f qla2xxx-32gbit: Move the qla2x00_rel_sp() calls from *_free_dma() into *_sp_compl()
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
2019-05-04 03:10:54 +00:00
Bart Van Assche
302850c3b1 qla2x00t-32gbit, qla2x00_set_fcport_state(): Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 03:09:32 +00:00
Bart Van Assche
eb6a71a76b qla2x00t-32gbit: Make qla24xx_async_abort_cmd() static
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
2019-05-04 03:08:45 +00:00
Bart Van Assche
3d3163759b qla2x00t-32gbit, target: Remove unnecessary locking from the target code
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
2019-05-04 03:08:12 +00:00
Bart Van Assche
3944c80f4b qla2x00t-32gbit, target: Remove an unused member variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 03:07:03 +00:00
Bart Van Assche
3e0f29be44 qla2x00t-32gbit: qla2x00_sp_compl(): Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 03:06:33 +00:00
Bart Van Assche
b51d8572b4 qla2x00t-32gbit: qla2xxx_eh_abort(): Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 03:06:06 +00:00
Bart Van Assche
6fdebad49e qla2x00t-32gbit, target: Fix offline port handling and host reset handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 03:05:36 +00:00
Bart Van Assche
9b5227ceb9 qla2x00t-32gbit: Introduce the be_id_t and le_id_t data types for FC src/dst IDs
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
2019-05-04 03:04:50 +00:00
Bart Van Assche
d70d9127d4 qla2x00t-32gbit: Reduce the number of casts
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
2019-05-04 02:11:45 +00:00
Bart Van Assche
ce3a4e22b5 qla2x00t-32gbit: Fix session lookup in qlt_abort_work()
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
2019-05-04 02:09:47 +00:00
Bart Van Assche
8f610f6f14 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-04 02:08:49 +00:00
Bart Van Assche
c7a1282878 scst_vdisk: Add a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-03 16:00:49 +00:00
Bart Van Assche
ca68c9e2dd qla2x00t-32gbit: Unbreak the build against kernel versions <= 4.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 15:05:58 +00:00
Bart Van Assche
38adb4f457 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 14:57:34 +00:00