Decide which SCSI header file to include based on a compile time check instead
of trying to derive that choice from the UEK kernel version.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since block_shift is unsigned, it can never be negative. See also commit
1e95312e49 ("Reenable block_shift calculation for tapes").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Apparently the UEK 8 FC patches have been ported to UEK 7. Make fcst build
against the latest UEK7 and UEK 8 kernels. This patch breaks compatibility
with older UEK 7 5.4.17 kernels.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
r9586+r9587 added support for UEK 8 but broke support for UEK 7. Since as
far as I know no compile-time constants are available in UEK that allow to
tell the difference between the UEK 7 and UEK 8 5.4.17 kernels, extract the
UEK release number from the name of the directory with the kernel build
infrastructure.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The scsi_done() function is new in kernel v5.16. Backport it to older
kernel versions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Instead of making vdev_open_fd() check the dev_active flag, let the callers
of this function check that flag. This patch does not change the behavior of
the scst_vdisk driver.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
See also upstream commit 7fe1e79b59ba ("configfs: implement the .read_iter
and .write_iter methods"; v5.14).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch fixes the build against UEK kernel 5.4.17-2136.300.7.el8uek and
breaks the build for older 5.4.17 UEK kernels, e.g.
5.4.17-2102.200.13.el8uek.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scst_cm_update_dev() calls
- scst_cm_dev_unregister(dev, false)
- scst_block_dev()
- scst_cm_get_lun()
- scst_cm_send_init_inquiry()
Due to commit 3e64094b ("scst_sysfs: Do not suspend I/O for LUN management")
scst_cm_dev_unregister() and scst_cm_get_lun() can be performed safely
without suspending SCSI command processing.
scst_block_dev() and scst_cm_send_init_inquiry() doesn't need SCST
to be suspended since scst_cm_dev_register(), which similarly calls
them, doesn't need to.
Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com>
[ bvanassche: modified patch title ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9583 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Remove a superfluous INIT_LIST_HEAD() call, add a lockdep_assert_held()
statement and fix an outdated comment.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Commit 6432df87e6 ("qla2x00t-32gbit: initialize fc4_type_priority") sets
the port mode to FCP or NVMe according to the NVRAM configuration. That results
in the following logs on my test setup:
qla2xxx [0000:00:09.0]-ffff:9: FC4 priority set to NVMe
qla2xxx [0000:00:0a.0]-ffff:10: FC4 priority set to NVMe
Since only FCP is supported in the SCST project, ignore the NVRAM configuration.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9580 d57e44dd-8a1f-0410-8b47-8ef2f437770f
As far as I know all SCST users are using kernel version 3.10 or later. Hence
stop testing kernel versions before 3.10, the kernel version used by RHEL 7.
This means dropping support for RHEL 6.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The calculation of block_shift was disabled for tape devices.
Enabling it again, as it is now being used in scst_tape_generic_parse.
Fixes: 0043f510cb ("block shift cleanups and fixes")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In 2015 bio_integrity_alloc() was modified such that it returns an error
pointer instead of NULL upon failure. Hence this patch.
See also upstream commit 06c1e3902aa7 ("blk-integrity: empty implementation
when disabled"; v4.5).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9576 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Remove this occurrence because it is not necessary and because checkpatch
complains about it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Instead of considering designators as equivalent if one is the prefix of
another, only accept an exact match of the designator length as required
by the SCSI standard.
Fixes: 5e90abb64a ("scst_copy_mgr: Implement a workaround for non-compliant initiator systems")
Fixes: 3fc775c75a ("EXTENDED COPY support")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
When Target port transitions personality from one to another (NVMe <-->
FCP), there could be some overlap of the two where one layer is going down
while the other layer is coming up. This overlap can cause temporary I/O
error. Detect those errors/transitions and recover from them. Triggers
session tear down and allow relogin to re-drive the connection under the
following conditions:
- NVMe command error
- On PRLO + N2N (rida format 2)
Link: https://lore.kernel.org/r/20210817051315.2477-11-njavali@marvell.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>
[ commit 7a8ff7d9854a1727435557184c8255bbbca60920 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
For target port that register itself as both FCP + NVMe, initiator driver
will try to login one mode at a time. If the last mode did not succeed,
then driver will try the other mode.
When error is encountered, current code only flip to other mode one time
(NVMe->FCP) and remain on the last mode. Driver wrongly assumed target
port does not support PRLI NVMe, instead it was not ready to receive PRLI.
This patch will alternate back and forth on every PRLI failure until login
retry count has depleted or it is succeeded.
Link: https://lore.kernel.org/r/20210817051315.2477-10-njavali@marvell.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>
[ commit f88444570072a6863f3e2bd67878560a51b187f2 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9562 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The following hung task call trace was seen:
[ 1230.183294] INFO: task qla2xxx_wq:523 blocked for more than 120 seconds.
[ 1230.197749] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1230.205585] qla2xxx_wq D 0 523 2 0x80004000
[ 1230.205636] Workqueue: qla2xxx_wq qlt_free_session_done [qla2xxx]
[ 1230.205639] Call Trace:
[ 1230.208100] __schedule+0x2c4/0x700
[ 1230.211607] schedule+0x38/0xa0
[ 1230.214769] schedule_timeout+0x246/0x2f0
[ 1230.222651] wait_for_completion+0x97/0x100
[ 1230.226921] qlt_free_session_done+0x6a0/0x6f0 [qla2xxx]
[ 1230.232254] process_one_work+0x1a7/0x360
...when device side port resets were done.
Abort threads were getting out without processing due to the "deleted"
flag check. The delete thread, meanwhile, could not proceed with a
logout (that would have cleared out pending requests) as the logout IOCB
work was not progressing. It appears like the hung qlt_free_session_done()
thread is causing the ha->wq works on hold. The qlt_free_session_done()
was hung waiting for nvme_fc_unregister_remoteport() + localport_delete cb
to be complete, which would only happen when all I/Os are released.
Fix this by allowing abort to progress until device delete is completely
done. This should make the qlt_free_session_done() proceed without hang and
thus clear up the deadlock.
Link: https://lore.kernel.org/r/20210817051315.2477-5-njavali@marvell.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>
[ commit 310e69edfbd57995868a428eeddea09a7b5d2749 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9557 d57e44dd-8a1f-0410-8b47-8ef2f437770f