Commit Graph

6937 Commits

Author SHA1 Message Date
Bart Van Assche
e770b4bbc2 Merge branch 'svn-trunk' 2019-05-04 19:03:41 -07: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
8b3893e002 Merge branch 'svn-trunk' 2019-05-03 20:13:48 -07: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
2182490839 Merge branch 'svn-trunk' 2019-05-03 18:09:10 -07: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
d37a050e07 Merge branch 'svn-trunk' 2019-05-02 21:38:48 -07: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
Bart Van Assche
0648851989 Merge branch 'svn-trunk' 2019-05-01 20:39:10 -07:00
Bart Van Assche
f19f8e80a1 qla2xxx-32gbit: Cleanup redundant qla2x00_abort_all_cmds during unload
This patch removes redundant qla2x00_abort_all_cmds() during driver unload.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 03:36:18 +00:00
Bart Van Assche
8759ca2caa qla2xxx-32gbit: Set remote port devloss timeout to 0
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
2019-05-02 03:35:17 +00:00
Bart Van Assche
4fda446112 qla2xxx-32gbit: Remove two superfluous casts
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
2019-05-02 03:22:58 +00:00
Bart Van Assche
dbc253a314 qla2xxx-32gbit: Remove qla_tgt_cmd.data_work and qla_tgt_cmd.data_work_free
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
2019-05-02 03:22:24 +00:00
Bart Van Assche
c383def6ab qla2xxx-32gbit: Fix formatting of pointer types
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
2019-05-02 03:20:14 +00:00
Bart Van Assche
abbd6b024f qla2xxx-32gbit: Leave a blank line after declarations
This patch improves readability of the qla2xxx source code.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 03:19:40 +00:00
Bart Van Assche
5850564555 qla2xxx-32gbit: Use tabs to indent code
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
2019-05-02 03:18:32 +00:00
Bart Van Assche
66736ef516 qla2xxx: Reduce the number of forward declarations
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
2019-05-02 03:12:58 +00:00
Bart Van Assche
db909e68ec qla2x00t-32gbit: Insert spaces where required
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
2019-05-02 03:05:59 +00:00
Bart Van Assche
f1fc35ae09 Merge branch 'svn-trunk' 2019-05-01 18:25:04 -07:00
Bart Van Assche
ff892731e1 qla2x00t-32gbit: display FC-NVMe port roles
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
2019-05-02 01:23:37 +00:00
Bart Van Assche
0384506862 qla2x00t-32gbit/qla_init.c: Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 00:52:23 +00:00
Bart Van Assche
94a78fcc94 qla2x00t-32gbit/qla_gbl.h: Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 00:50:02 +00:00
Bart Van Assche
27e83157ed Merge branch 'svn-trunk' 2019-05-01 17:46:30 -07:00
Bart Van Assche
f9b50fa1e3 qla2x00t-32gbit/qla_isr.c: Fix a sparse complaint
Avoid that the 'sparse' static checker complains that the ha->msix_entries[]
array can be accessed outside its bounds. 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-02 00:01:08 +00:00
Bart Van Assche
478ee96c23 qla2x00t-32gbit/qla_iocb.c: Minimize diffs with upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:58:31 +00:00
Bart Van Assche
47f648c88f qla2x00t-32gbit/qla_init.c: Minimize diffs with upstream
Move a few function definitions to minimize the diffs with the code in
the upstream Linux kernel.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:52:05 +00:00
Bart Van Assche
ab1210a555 qla2x00t-32gbit/qla_gs.c: Improve conformance with the Linux kernel coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:46:12 +00:00
Bart Van Assche
c6b032a4c9 qla2xxx-32gbit: Move qla2x00_set_fcport_state() from a .h into a .c file
The qla2x00_set_fcport_state() function is not in the hot path so move its
definition from a .h into a .c file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:44:06 +00:00
Bart Van Assche
9ba763d4c9 qla2xxx-32gbit: Move the port_state_str[] definition from a .h to a .c file
Reduce the size of the qla2xxx kernel module by moving an array definition
from a .h into a .c file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:39:21 +00:00
Bart Van Assche
7fecd3b8eb qla2x00t-32gbit/qla_attr: Use whitespace according to the Linux kernel coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8304 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:33:56 +00:00
Bart Van Assche
d51104193e qla2xxx-32gbit: Avoid that qlt_send_resp_ctio() corrupts memory
The "(&ctio->u.status1.sense_data)[i]" where i >= 0 expressions in
qlt_send_resp_ctio() are probably typos and should have been
"(&ctio->u.status1.sense_data[4 * i])" instead. Instead of only fixing
these typos, modify the code for storing sense data such that it becomes
easy to read. This patch fixes a Coverity complaint about accessing an
array outside its bounds.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8303 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:20:21 +00:00
Bart Van Assche
1ef60963cc qla2xxx-32gbit: Complain loudly about reference count underflow
A reference count underflow is a severe bug. Hence complain loudly if a
reference count underflow happens.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8302 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:19:24 +00:00
Bart Van Assche
f227304e06 qla2xxx-32gbit: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware
This patch makes the code easier to read and more compact.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8301 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:17:12 +00:00
Bart Van Assche
eebffe2501 qla2xxx-32gbit: Introduce the dsd32 and dsd64 data structures
Introduce two structures for the (DMA address, length) combination instead
of using separate structure members for the DMA address and length. This
patch fixes several Coverity complaints about 'cur_dsd' being used to write
outside the bounds of structure members.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8300 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:16:12 +00:00
Bart Van Assche
4617ce2b50 qla2x00t-32gbit: Check the size of firmware data structures at compile time
Since the next patch will modify several firmware data structures, add
compile time checks that verify that these structures have the correct
size.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8299 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 23:01:38 +00:00
Bart Van Assche
b3b35716cf qla2x00t-32gbit: Move a chunk of code
Move two if-statements from where the 'patch' command dropped them to
where these should be. See also r8296.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:59:06 +00:00
Bart Van Assche
a9b07e561b qla2xxx-32gbit: Simplify qlt_send_term_imm_notif()
All qlt_send_term_imm_notif() callers pass '1' as second argument to this
function. Hence remove the (broken) code that depends on that second
argument having another value. Add a pr_debug() statement that prints rc to
avoid that the compiler would complain that rc has been set but is not
used.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8297 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-01 22:41:38 +00:00