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
This patch sets remote_port_devloss value to 0. This indicates to FC-NVMe
transport that driver is unloading and transport should not retry.
Fixes: e476fe8af5ff ("scsi: qla2xxx: Fix unload when NVMe devices are configured")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Casting a void pointer into another pointer before assigning the pointer to
a variable is not useful. Hence remove such casts.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The 'data_work' and 'data_work_free' member variables are set but never
used. Hence remove both member variables. See also commit 6bcbb3174caa
("qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Improve source code readability by following the Linux kernel coding style
for pointer types. This patch only changes whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Most but not all code in the qla2xxx driver uses tabs for indentation.
Make the qla2xxx code easier to read by using tabs consistently for
indentation. This patch improves conformance with the Linux kernel coding
style.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move the SCSI host template definition after the definition of the
functions that it references. Remove the forward declarations that became
unnecessary by that change. This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Improve source code readability by inserting spaces where these are
required according to the coding standard. This patch only inserts
whitespace and does not make any other changes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8314 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Currently the FC-NVMe driver is leverating 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.
Upstream commit: a6a6d0589ac4 ("scsi: scsi_transport_fc: nvme: display FC-NVMe port roles").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8313 d57e44dd-8a1f-0410-8b47-8ef2f437770f