Commit Graph

6963 Commits

Author SHA1 Message Date
Bart Van Assche
2fb10fb2ff scstadmin: Restore support for replacing LUNs that are inside a group
Fixes: a3266ca8f2 ("scstadmin: Remove support for the "new" sysfs interface")
Reported-by: Pavel Klevtsov


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-14 03:31:59 +00:00
Bart Van Assche
a4ea5c02e1 iscsi-scst: Fix SHA-1 algorithm number
According to
https://www.iana.org/assignments/ppp-numbers/ppp-numbers.xml#ppp-numbers-9
the value of the SHA-1 algorithm is 6 and not 7, as it is now in
iscsi-scst/usr/chap.c. If on a client side node.session.auth.chap_algs is
SHA1, login fails.

Signed-off-by: Lev Vainblat <lev@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-14 02:15:33 +00:00
Bart Van Assche
1b2bdd56b5 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-02 02:35:39 +00:00
Vladislav Bolkhovitin
de7a490d4a Minor web fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-23 19:38:11 +00:00
Bart Van Assche
59f38038ab iscsi-scst: Remove an obsolete comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9168 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-19 17:01:31 +00:00
Bart Van Assche
741d1d38dc scst: Partially revert r9166
Apparently the RHEL 8.2 gcc compiler reports an error if
__attribute__((fallthrough)) is used outside a switch statement. Hence this
patch that converts some of these annotations back into comments.

Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-19 00:28:44 +00:00
Bart Van Assche
186798cec4 Use the fallthrough macro instead of a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 14:28:36 +00:00
Bart Van Assche
570a36ffd2 scripts/checkpatch: Only analyze kernel source code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 14:27:44 +00:00
Bart Van Assche
5969e85967 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 03:02:36 +00:00
Bart Van Assche
4933f27d8d scst: Make scst/include/backport.h again compatible with MOFED
Fix the following build failure on RHEL 7 + MOFED 5.0:

In file included from <command-line>:0:0:
/usr/src/ofa_kernel/default/include/linux/compat-2.6.h:40:29: warning: "__GCC4_has_attribute___fallthrough__" is not defined [-Wundef]
 # define __has_attribute(x) __GCC4_has_attribute_##x
                             ^
/usr/src/packages/BUILD/scst-3.5.0.7946/iscsi-scst/kernel/isert-scst/../../../scst/include/backport.h:250:5: note: in expansion of macro '__has_attribute'
 #if __has_attribute(__fallthrough__)

Reported-by: Chesnokov Gleb <Chesnokov.G@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 02:59:28 +00:00
Bart Van Assche
443c7ec5d9 scstadmin: Make argument checking more systematic
Additionally, suppress warning messages about 'length(undefined)' on RHEL 6.x.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:47:40 +00:00
Bart Van Assche
9d9ae0f153 scst: Restore compatibility with gcc 4.x (RHEL 7.x)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:44:03 +00:00
Bart Van Assche
85fed6fa4a scst: Restore compatibility with RHEL 6.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:43:05 +00:00
Bart Van Assche
4023bdadbd scstadmin: Fix a Perl warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 18:00:55 +00:00
Bart Van Assche
6d60231631 scstadmin: Support passing an empty string to set*Attribute()
Validate the $value argument of set functions with defined() instead of
length(). Append a newline to the end of $value before writing it into
a sysfs attribute to make sure something gets written if $value eq "".


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:56:26 +00:00
Bart Van Assche
7e3fe7a80e scstadmin: Fix the readOnly() subroutine
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:54:26 +00:00
Bart Van Assche
c121a6ded8 scstadmin: Adjust source code formatting
Remove a single space that follows a unary negation operator.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:53:27 +00:00
Bart Van Assche
7e012f4a80 scstadmin: Improve error reporting
Report "Failed to set a SCST attribute" instead of "SCST attribute specified
is static" if modifying of an attribute fails.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 23:29:44 +00:00
Bart Van Assche
3825bf2093 scstadmin Makefile: Show diff if a regression test fails
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 22:42:19 +00:00
Bart Van Assche
95993cd9fd scstadmin/scstadmin.sysfs/scst-1.0.0/t/07-scstadmin-args.t: Filter out ib_srpt
The scstadmin output for the ib_srpt driver depends on whether or not an
RDMA HCA is present and also on the port GUIDs. Hence filter out the
ib_srpt data.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 22:16:05 +00:00
Bart Van Assche
8d3c1cf3a2 scstadmin: Use length($var) to test whether an argument has been specified
This patch fixes a bug by making it again possible to use "0" as e.g. the
name of an SCST device group. See also commit 858f50e4d3 ("scstadmin:
Improve robustness").

Reported-by: Pavel Klevtsov


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 03:20:47 +00:00
Bart Van Assche
a3266ca8f2 scstadmin: Remove support for the "new" sysfs interface
Around 2011 a sysfs-tree-changes branch was created in the SourceForge
repository because Greg KH asked to rework the SCST sysfs interface. That
interface is called the "new" sysfs interface. The current and only used
API is called the "old" sysfs interface. Since the "new" sysfs interface
never had any users other than myself, remove support for that interface.

See also commit a66cbc4115 ("scstadmin: Add support for the sysfs
interface provided by the code on the sysfs-tree-changes branch").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 03:12:26 +00:00
Bart Van Assche
ad546b1e68 scst: Add support for wildcard matching to the copy manager
Reported-by: L <514005989@qq.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-05 04:21:56 +00:00
Bart Van Assche
bd3aa5d4a5 iscsi-scst: Port to Linux kernel v5.9
In Linux kernel v5.9 use of the KERNEL_SOCKPTR() function is mandatory
when calling setsockopt(). Implement that function for kernels before v5.9.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 21:16:47 +00:00
Bart Van Assche
10ede52dd9 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:11:39 +00:00
Bart Van Assche
ac08491d6a scst/include/backport.h: Backport the fallthrough macro
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:11:31 +00:00
Bart Van Assche
bb63af5901 qla2xxx: Fix wrong return value in qla_nvme_register_hba()
On an error exit path, a negative error code should be returned instead of
a positive return value.

Link: https://lore.kernel.org/r/20200802111530.5020-1-tianjia.zhang@linux.alibaba.com
Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine")
Cc: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit ca4fb89a3d714a770e9c73c649da830f3f4a5326.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:04:14 +00:00
Bart Van Assche
d3c5f58492 qla2x00t-32gbit: Fix wrong return value in qlt_chk_unresolv_exchg()
In the case of a failed retry, a positive value EIO is returned here.  I
think this is a typo error. It is necessary to return an error value.

[mkp: caller checks != 0 but the rest of the file uses -Exxx so fix this up
to be consistent]

Link: https://lore.kernel.org/r/20200802111528.4974-1-tianjia.zhang@linux.alibaba.com
Fixes: 0691094ff3f2 ("scsi: qla2xxx: Add logic to detect ABTS hang and response completion")
Cc: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit bbf2d06a9d767718bfe6028d6288c03edb98554a.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9145 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:03:37 +00:00
Bart Van Assche
75687c6513 qla2x00t-32gbit: Remove redundant variable initialization
The initialization value of `rc` is wrong. It is unnecessary to initialize
`rc` variables, so remove its initialization operation.

Link: https://lore.kernel.org/r/20200802111527.4928-1-tianjia.zhang@linux.alibaba.com
Fixes: 84905dfe78d2 ("scsi: qla2xxx: Fix TMF and Multi-Queue config")
Cc: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 8905cbdae986515c5a4dcd71889672235478f189.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:02:48 +00:00
Bart Van Assche
735be2120c qla2x00t-32gbit: Fix the size used in a 'dma_free_coherent()' call
Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()'.

[mkp: removed memset() hunk that has already been addressed]
    
Link: https://lore.kernel.org/r/20200802110721.677707-1-christophe.jaillet@wanadoo.fr
Fixes: 4161cee52df8 ("[SCSI] qla4xxx: Add host statistics support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 650b323c8e7c3ac4830a20895b1d444fd68dd787.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:02:06 +00:00
Bart Van Assche
9b6e29baff qla2x00t-32gbit: Remove pci-dma-compat wrapper API
Link: https://lore.kernel.org/r/24627a86cf1e67fd229bc323316523d1ba0811f9.1596045683.git.usuraj35@gmail.com
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 8d1f1ffaeb27ca81ea0dd24e238015efee7b5924.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:01:22 +00:00
Bart Van Assche
22ca3580da qla2x00t-32gbit: Remove superfluous memset()
Fixes coccicheck warning:

./drivers/scsi/qla2xxx/qla_mbx.c:4928:15-33: WARNING: dma_alloc_coherent use in els_cmd_map already zeroes out memory,  so memset is not needed

dma_alloc_coherent() already zeroes out memory so memset() is not needed.

Link: https://lore.kernel.org/r/1596079918-41115-3-git-send-email-liheng40@huawei.com
Signed-off-by: Li Heng <liheng40@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit bef93fbfcf4ae9ecaa50e38d32cf6b8dbce4a797.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:00:15 +00:00
Bart Van Assche
f872ffa8a9 iscsi-scst/kernel/isert-scst/Kbuild: Fix the isert-scst build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9140 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:52:09 +00:00
Bart Van Assche
d923eed64b qla2x00t-32gbit: Use fallthrough pseudo keyword
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

See also upstream commit dca93232b361d260413933903cd4bdbd92ebcc7f.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:47:45 +00:00
Bart Van Assche
9b2f2a4a71 qla2x00t-32gbit: Revert "Disable T10-DIF feature with FC-NVMe during probe"
FCP T10-PI and NVMe features are independent of each other. This patch
allows both features to co-exist.

This reverts commit 5da05a26b8305a625bc9d537671b981795b46dab.

Link: https://lore.kernel.org/r/20200806111014.28434-12-njavali@marvell.com
Fixes: 5da05a26b830 ("scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit dca93232b361d260413933903cd4bdbd92ebcc7f.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:46:48 +00:00
Bart Van Assche
e2451f62db qla2x00t-32gbit: Revert "Fix crash on qla2x00_mailbox_command"
FCoE adapter initialization failed for ISP8021 with the following patch
applied. In addition, reproduction of the issue the patch originally tried
to address has been unsuccessful.

This reverts commit 3cb182b3fa8b7a61f05c671525494697cba39c6a.

Link: https://lore.kernel.org/r/20200806111014.28434-11-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit de7e6194301ad31c4ce95395eb678e51a1b907e5.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9137 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:46:03 +00:00
Bart Van Assche
05cc5a7aab qla2x00t-32gbit: Fix null pointer access during disconnect from subsystem
NVMEAsync command is being submitted to QLA while the same NVMe controller
is in the middle of reset. The reset path has deleted the association and
freed aen_op->fcp_req.private. Add a check for this private pointer before
issuing the command.

...
 6 [ffffb656ca11fce0] page_fault at ffffffff8c00114e
    [exception RIP: qla_nvme_post_cmd+394]
    RIP: ffffffffc0d012ba  RSP: ffffb656ca11fd98  RFLAGS: 00010206
    RAX: ffff8fb039eda228  RBX: ffff8fb039eda200  RCX: 00000000000da161
    RDX: ffffffffc0d4d0f0  RSI: ffffffffc0d26c9b  RDI: ffff8fb039eda220
    RBP: 0000000000000013   R8: ffff8fb47ff6aa80   R9: 0000000000000002
    R10: 0000000000000000  R11: ffffb656ca11fdc8  R12: ffff8fb27d04a3b0
    R13: ffff8fc46dd98a58  R14: 0000000000000000  R15: ffff8fc4540f0000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 7 [ffffb656ca11fe08] nvme_fc_start_fcp_op at ffffffffc0241568 [nvme_fc]
 8 [ffffb656ca11fe50] nvme_fc_submit_async_event at ffffffffc0241901 [nvme_fc]
 9 [ffffb656ca11fe68] nvme_async_event_work at ffffffffc014543d [nvme_core]
10 [ffffb656ca11fe98] process_one_work at ffffffff8b6cd437
11 [ffffb656ca11fed8] worker_thread at ffffffff8b6cdcef
12 [ffffb656ca11ff10] kthread at ffffffff8b6d3402
13 [ffffb656ca11ff50] ret_from_fork at ffffffff8c000255

--
PID: 37824  TASK: ffff8fb033063d80  CPU: 20  COMMAND: "kworker/u97:451"
 0 [ffffb656ce1abc28] __schedule at ffffffff8be629e3
 1 [ffffb656ce1abcc8] schedule at ffffffff8be62fe8
 2 [ffffb656ce1abcd0] schedule_timeout at ffffffff8be671ed
 3 [ffffb656ce1abd70] wait_for_completion at ffffffff8be639cf
 4 [ffffb656ce1abdd0] flush_work at ffffffff8b6ce2d5
 5 [ffffb656ce1abe70] nvme_stop_ctrl at ffffffffc0144900 [nvme_core]
 6 [ffffb656ce1abe80] nvme_fc_reset_ctrl_work at ffffffffc0243445 [nvme_fc]
 7 [ffffb656ce1abe98] process_one_work at ffffffff8b6cd437
 8 [ffffb656ce1abed8] worker_thread at ffffffff8b6cdb50
 9 [ffffb656ce1abf10] kthread at ffffffff8b6d3402
10 [ffffb656ce1abf50] ret_from_fork at ffffffff8c000255

Link: https://lore.kernel.org/r/20200806111014.28434-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 83949613fac61e8e37eadf8275bf072342302f4e.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9136 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:45:14 +00:00
Bart Van Assche
3b4406ec4a qla2x00t-32gbit: Check if FW supports MQ before enabling
OS boot during Boot from SAN was stuck at dracut emergency shell after
enabling NVMe driver parameter. For non-MQ support the driver was enabling
MQ. Add a check to confirm if FW supports MQ.

Link: https://lore.kernel.org/r/20200806111014.28434-9-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit dffa11453313a115157b19021cc2e27ea98e624c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:44:15 +00:00
Bart Van Assche
49ba5cf318 qla2x00t-32gbit: Fix WARN_ON in qla_nvme_register_hba
qla_nvme_register_hba() puts out a warning when there are not enough queue
pairs available for FC-NVME.  Just fail the NVME registration rather than a
WARNING + call Trace.

Link: https://lore.kernel.org/r/20200806111014.28434-8-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 897d68eb816bfae5ad9e870f68350dbb599d6e0e.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:43:39 +00:00
Bart Van Assche
426ee6a956 qla2x00t-32gbit: Allow ql2xextended_error_logging special value 1 to be set anytime
ql2xextended_error_logging can now be set to 1 to get the default mask
value, as opposed to at module load time only.

Link: https://lore.kernel.org/r/20200806111014.28434-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 49030003a38a5e3688781e2ccf9550dcebf61282.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9133 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:43:07 +00:00
Bart Van Assche
c61452b67a qla2xxx-32gbit: Reduce noisy debug message
Update debug level and message for ELS IOCB done.

Link: https://lore.kernel.org/r/20200806111014.28434-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 81b9d1e19d62bf876c3985dbaf53a3a50eedd74b.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:42:29 +00:00
Bart Van Assche
124ee51ee9 qla2xxx: Fix login timeout
Multipath errors were seen during failback due to login timeout.  The
remote device sent LOGO, the local host tore down the session and did
relogin. The RSCN arrived indicates remote device is going through failover
after which the relogin is in a 20s timeout phase.  At this point the
driver is stuck in the relogin process.  Add a fix to delete the session as
part of abort/flush the login.

Link: https://lore.kernel.org/r/20200806111014.28434-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit abb31aeaa9b20680b0620b23fea5475ea4591e31.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:41:31 +00:00
Bart Van Assche
73a1b8cddf qla2x00t-32gbit: Indicate correct supported speeds for Mezz card
Correct the supported speeds for 16G Mezz card.

Link: https://lore.kernel.org/r/20200806111014.28434-4-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 4709272f6327cc4a8ee1dc55771bcf9718346980.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9130 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:27:58 +00:00
Bart Van Assche
15a7fff96d qla2x00t-32gbit: Flush I/O on zone disable
Perform implicit logout to flush I/O on zone disable.

Link: https://lore.kernel.org/r/20200806111014.28434-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit a117579d0205b5a0592a3a98493e2b875e4da236.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9129 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:27:04 +00:00
Bart Van Assche
e03244543a qla2x00t-32gbit: Flush all sessions on zone disable
On Zone Disable, certain switches would ignore all commands. This causes
timeout for both switch scan command and abort of that command. On
detection of this condition, all sessions will be shutdown.

Link: https://lore.kernel.org/r/20200806111014.28434-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 10ae30ba664822f62de169a61628e31c999c7cc8.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9128 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:26:23 +00:00
Bart Van Assche
9ad05ec8e6 qla2x00t-32gbit: Use MBX_TOV_SECONDS for mailbox command timeout values
Improves readability of qla_mbx.c.

Link: https://lore.kernel.org/r/20200805200546.22497-1-ematsumiya@suse.de
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit c314a014b1802d30f1dc50db18b2e7f5a77d19c6.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:25:34 +00:00
Bart Van Assche
f7c295ca26 qla2xxx: Fix a condition in qla2x00_find_all_fabric_devs()
This code doesn't make sense unless the correct "fcport" was found.

Link: https://lore.kernel.org/r/20200619143041.GD267142@mwanda
Fixes: 9dd9686b1419 ("scsi: qla2xxx: Add changes for devloss timeout in driver")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 1fc98aaf7f85fadcca57c4a86ef17e1940cad2d3.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9126 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:24:52 +00:00
Bart Van Assche
b2b56e6eca qla2x00t-32gbit: Keep initiator ports after RSCN
The driver performs SCR (state change registration) in all modes including
pure target mode.

For each RSCN, scan_needed flag is set in qla2x00_handle_rscn() for the
port mentioned in the RSCN and fabric rescan is scheduled. During the
rescan, GNN_FT handler, qla24xx_async_gnnft_done() deletes session of the
port that caused the RSCN.

In target mode, the session deletion has an impact on ATIO handler,
qlt_24xx_atio_pkt(). Target responds with SAM STATUS BUSY to I/O incoming
from the deleted session. qlt_handle_cmd_for_atio() and
qlt_handle_task_mgmt() return -EFAULT if they are not able to find session
of the command/TMF, and that results in invocation of qlt_send_busy():

  qlt_24xx_atio_pkt_all_vps: qla_target(0): type 6 ox_id 0014
  qla_target(0): Unable to send command to target, sending BUSY status

Such response causes command timeout on the initiator. Error handler thread
on the initiator will be spawned to abort the commands:

  scsi 23:0:0:0: tag#0 abort scheduled
  scsi 23:0:0:0: tag#0 aborting command
  qla2xxx [0000:af:00.0]-188c:23: Entered qla24xx_abort_command.
  qla2xxx [0000:af:00.0]-801c:23: Abort command issued nexus=23:0:0 -- 0 2003.

Command abort is rejected by target and fails (2003), error handler then
tries to perform DEVICE RESET and TARGET RESET but they're also doomed to
fail because TMFs are ignored for the deleted sessions.

Then initiator makes BUS RESET that resets the link via
qla2x00_full_login_lip(). BUS RESET succeeds and brings initiator port up,
SAN switch detects that and sends RSCN to the target port and it fails
again the same way as described above. It never goes out of the loop.

The change breaks the RSCN loop by keeping initiator sessions mentioned in
RSCN payload in all modes, including dual and pure target mode.

Link: https://lore.kernel.org/r/20200605144435.27023-1-r.bolshakov@yadro.com
Fixes: 2037ce49d30a ("scsi: qla2xxx: Fix stale session")
Cc: Quinn Tran <qutran@marvell.com>
Cc: Arun Easi <aeasi@marvell.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: stable@vger.kernel.org # v5.4+
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Shyam Sundar <ssundar@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 632f24f09d5b7c8a2f94932c3391ca957ae76cc4.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9125 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:20:49 +00:00
Bart Van Assche
0a2748f657 qla2x00t-32gbit: Set NVMe status code for failed NVMe FCP request
The qla2xxx driver knows when request was processed successfully or
not. But it always sets the NVMe status code to 0/NVME_SC_SUCCESS. The
upper layer needs to figure out from the rcv_rsplen and transferred_length
variables if the request was transferred successfully. This is not always
possible, e.g. when the request data length is 0, the transferred_length is
also set 0 which is interpreted as success in nvme_fc_fcpio_done(). Let's
inform the upper layer (nvme_fc_fcpio_done()) when something went wrong.

nvme_fc_fcpio_done() maps all non-NVME_SC_SUCCESS status codes to
NVME_SC_HOST_PATH_ERROR. There isn't any benefit to map the QLA status code
to the NVMe status code. Therefore, use NVME_SC_INTERNAL to indicate an
error which aligns it with the lpfc driver.

Link: https://lore.kernel.org/r/20200604100745.89250-1-dwagner@suse.de
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit ef2e3ec520a8c20661ca4e7d17a5c7110d3a7828.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9124 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 15:19:56 +00:00
Bart Van Assche
be6191fb92 debian: make scst-dkms provide scst
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 03:17:06 +00:00