Gleb Chesnokov
2fea7e484f
qla2x00t-32gbit: Remove the unused 'del_list_entry' field in struct fc_port
...
The 'del_list_entry' field in "struct fc_port" is unused.
The field was introduced in commit 2d70c103fd2a ("[SCSI] qla2xxx: Add LLD
target-mode infrastructure for >= 24xx series") in 2012-05 and the last
user was removed in commit 726b85487067 ("qla2xxx: Add framework for async
fabric discovery") in 2017-02.
Remove this unused field.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/69155321ab26c1f4d473d5bb6cd44b59b9b6a020.1724094686.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit e59f43fb6477 upstream ]
2024-11-07 14:02:05 +03:00
Gleb Chesnokov
61f365f96e
scst: Expand all create*_workqueue() invocations
...
The workqueue maintainer wants to remove the create*_workqueue() macros
because these macros always set the WQ_MEM_RECLAIM flag and because these
only support literal workqueue names. Hence this patch that replaces the
create*_workqueue() invocations with the definition of this macro. The
WQ_MEM_RECLAIM flag has been retained because I think that flag is necessary
for workqueues created by storage drivers.
2024-11-07 14:02:05 +03:00
Gleb Chesnokov
31eca7eced
.github/workflows: Use checkpatch scripts
...
Inroduce several checkpatch scripts to use in workflows.
2024-11-07 13:21:25 +03:00
Gleb Chesnokov
fca4d58822
.github/workflows: Run regression tests upon a pull request
...
Also allow regression tests to run upon a pull request.
2024-11-07 13:21:25 +03:00
Gleb Chesnokov
256d695afa
scst: Port to Linux kernel v6.12
...
Support for the following changes in the Linux kernel v6.12:
- 5f60d5f6bbc1 ("move asm/unaligned.h to linux/unaligned.h")
- cb787f4ac0c2 ("[tree-wide] finally take no_llseek out")
2024-11-07 13:21:25 +03:00
Gleb Chesnokov
1925094cb0
.github/workflows, scripts: Improve checkpatch compliance
...
Use checkpatch --strict to detect more style issues.
2024-10-01 16:17:11 +03:00
Gleb Chesnokov
878bbad8ce
nightly build: Update kernel versions
...
Another kernel versions update
2024-09-16 13:44:01 +03:00
Gleb Chesnokov
376838e898
scripts/run-regression-tests: Improve support for RHEL kernels
...
Additionally, update kernel versions.
2024-09-04 20:12:26 +03:00
Gleb Chesnokov
ca51801d25
qla2x00t-32gbit: Convert comma to semicolon
...
Replace a comma between expression statements by a semicolon.
Fixes: d4523bd6fd5d ("scsi: qla2xxx: Refactor asynchronous command initialization")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn >
Link: https://lore.kernel.org/r/20240711005724.2358446-1-nichen@iscas.ac.cn
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 6ca9fede7c73 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
096a7271ca
qla2x00t-32gbit: Update version to 10.02.09.300-k
...
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit a1392b19ca59 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
4726c8a0d1
qla2x00t-32gbit: Use QP lock to search for bsg
...
On bsg timeout, hardware_lock is used as part of search for the srb.
Instead, qpair lock should be used to iterate through different qpair.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-11-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit c449b4198701 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
d66e9dea01
qla2x00t-32gbit: Reduce fabric scan duplicate code
...
For fabric scan, current code uses switch scan opcode and flags as the
method to iterate through different commands to carry out the process.
This makes it hard to read. This patch convert those opcode and flags into
steps. In addition, this help reduce some duplicate code.
Consolidate routines that handle GPNFT & GNNFT.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit beafd6924614 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
7920ac0e45
qla2x00t-32gbit: Fix optrom version displayed in FDMI
...
Bios version was popluated for FDMI response. Systems with EFI would show
optrom version as 0. EFI version is populated here and BIOS version is
already displayed under FDMI_HBA_BOOT_BIOS_NAME.
Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-9-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 348744f27a35 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
e5da16ad31
qla2x00t-32gbit: During vport delete send async logout explicitly
...
During vport delete, it is observed that during unload we hit a crash
because of stale entries in outstanding command array. For all these stale
I/O entries, eh_abort was issued and aborted (fast_fail_io = 2009h) but
I/Os could not complete while vport delete is in process of deleting.
BUG: kernel NULL pointer dereference, address: 000000000000001c
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1 ] PREEMPT SMP NOPTI
Workqueue: qla2xxx_wq qla_do_work [qla2xxx]
RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0
RSP: 0018:ffffa1e1e150fc68 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000001
RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8ce208a7a0d0
RBP: ffff8ce208a7a0d0 R08: 0000000000000000 R09: ffff8ce378aac9c8
R10: ffff8ce378aac8a0 R11: ffffa1e1e150f9d8 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8ce378aac9c8 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8d217f000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000001c CR3: 0000002089acc000 CR4: 0000000000350ee0
Call Trace:
<TASK>
qla2xxx_qpair_sp_free_dma+0x417/0x4e0
? qla2xxx_qpair_sp_compl+0x10d/0x1a0
? qla2x00_status_entry+0x768/0x2830
? newidle_balance+0x2f0/0x430
? dequeue_entity+0x100/0x3c0
? qla24xx_process_response_queue+0x6a1/0x19e0
? __schedule+0x2d5/0x1140
? qla_do_work+0x47/0x60
? process_one_work+0x267/0x440
? process_one_work+0x440/0x440
? worker_thread+0x2d/0x3d0
? process_one_work+0x440/0x440
? kthread+0x156/0x180
? set_kthread_struct+0x50/0x50
? ret_from_fork+0x22/0x30
</TASK>
Send out async logout explicitly for all the ports during vport delete.
Cc: stable@vger.kernel.org
Signed-off-by: Manish Rangankar <mrangankar@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-8-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 76f480d7c717 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
500979d486
qla2x00t-32gbit: Complete command early within lock
...
A crash was observed while performing NPIV and FW reset,
BUG: kernel NULL pointer dereference, address: 000000000000001c
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 1 PREEMPT_RT SMP NOPTI
RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0
RSP: 0018:ffffc90026f47b88 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000002
RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8881041130d0
RBP: ffff8881041130d0 R08: 0000000000000000 R09: 0000000000000034
R10: ffffc90026f47c48 R11: 0000000000000031 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8881565e4a20 R15: 0000000000000000
FS: 00007f4c69ed3d00(0000) GS:ffff889faac80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000001c CR3: 0000000288a50002 CR4: 00000000007706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
<TASK>
? __die_body+0x1a/0x60
? page_fault_oops+0x16f/0x4a0
? do_user_addr_fault+0x174/0x7f0
? exc_page_fault+0x69/0x1a0
? asm_exc_page_fault+0x22/0x30
? dma_direct_unmap_sg+0x51/0x1e0
? preempt_count_sub+0x96/0xe0
qla2xxx_qpair_sp_free_dma+0x29f/0x3b0 [qla2xxx]
qla2xxx_qpair_sp_compl+0x60/0x80 [qla2xxx]
__qla2x00_abort_all_cmds+0xa2/0x450 [qla2xxx]
The command completion was done early while aborting the commands in driver
unload path but outside lock to avoid the WARN_ON condition of performing
dma_free_attr within the lock. However this caused race condition while
command completion via multiple paths causing system crash.
Hence complete the command early in unload path but within the lock to
avoid race condition.
Fixes: 0367076b0817 ("scsi: qla2xxx: Perform lockless command completion in abort path")
Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 4475afa2646d upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
30cb67f0c1
qla2x00t-32gbit: Fix flash read failure
...
Link up failure is observed as a result of flash read failure. Current
code does not check flash read return code where it relies on FW checksum
to detect the problem.
Add check of flash read failure to detect the problem sooner.
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/all/202406210815.rPDRDMBi-lkp@intel.com/
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 29e222085d89 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
8ec5a49d4b
qla2x00t-32gbit: Return ENOBUFS if sg_cnt is more than one for ELS cmds
...
Firmware only supports single DSDs in ELS Pass-through IOCB (0x53h), sg cnt
is decided by the SCSI ML. User is not aware of the cause of an acutal
error.
Return the appropriate return code that will be decoded by API and
application and proper error message will be displayed to user.
Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.")
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit ce2065c4cc4f upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
4580c85a6e
qla2x00t-32gbit: Fix for possible memory corruption
...
Init Control Block is dereferenced incorrectly. Correctly dereference ICB
Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-4-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit c03d740152f7 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
d002f0afd5
qla2x00t-32gbit: validate nvme_local_port correctly
...
The driver load failed with error message,
qla2xxx [0000:04:00.0]-ffff:0: register_localport failed: ret=ffffffef
and with a kernel crash,
BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
Workqueue: events_unbound qla_register_fcport_fn [qla2xxx]
RIP: 0010:nvme_fc_register_remoteport+0x16/0x430 [nvme_fc]
RSP: 0018:ffffaaa040eb3d98 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff9dfb46b78c00 RCX: 0000000000000000
RDX: ffff9dfb46b78da8 RSI: ffffaaa040eb3e08 RDI: 0000000000000000
RBP: ffff9dfb612a0a58 R08: ffffffffaf1d6270 R09: 3a34303a30303030
R10: 34303a303030305b R11: 2078787832616c71 R12: ffff9dfb46b78dd4
R13: ffff9dfb46b78c24 R14: ffff9dfb41525300 R15: ffff9dfb46b78da8
FS: 0000000000000000(0000) GS:ffff9dfc67c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000070 CR3: 000000018da10004 CR4: 00000000000206f0
Call Trace:
qla_nvme_register_remote+0xeb/0x1f0 [qla2xxx]
? qla2x00_dfs_create_rport+0x231/0x270 [qla2xxx]
qla2x00_update_fcport+0x2a1/0x3c0 [qla2xxx]
qla_register_fcport_fn+0x54/0xc0 [qla2xxx]
Exit the qla_nvme_register_remote() function when qla_nvme_register_hba()
fails and correctly validate nvme_local_port.
Cc: stable@vger.kernel.org
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit eb1d4ce26095 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
1e5f77a931
qla2x00t-32gbit: Unable to act on RSCN for port online
...
The device does not come online when the target port is online. There were
multiple RSCNs indicating multiple devices were affected. Driver is in the
process of finishing a fabric scan. A new RSCN (device up) arrived at the
tail end of the last fabric scan. Driver mistakenly thinks the new RSCN is
being taken care of by the previous fabric scan, where this notification is
cleared and not acted on. The laser needs to be blinked again to get the
device to show up.
To prevent driver from accidentally clearing the RSCN notification, each
RSCN is given a generation value. A fabric scan will scan for that
generation(s). Any new RSCN arrive after the scan start will have a new
generation value. This will trigger another scan to get latest data. The
RSCN notification flag will be cleared when the scan is associate to that
generation.
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202406210538.w875N70K-lkp@intel.com/
Fixes: bb2ca6b3f09a ("scsi: qla2xxx: Relogin during fabric disturbance")
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240710171057.35066-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit c3d98b12eef8 upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
e73abbd6b8
qla2x00t-32gbit: Remove unused struct 'scsi_dif_tuple'
...
'scsi_dif_tuple' is unused since commit 8cb2049c7448 ("[SCSI] qla2xxx: T10
DIF - Handle uninitalized sectors.").
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org >
Link: https://lore.kernel.org/r/20240528215640.91771-1-linux@treblig.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 96281dfa266d upstream ]
2024-09-04 14:34:12 +03:00
Gleb Chesnokov
667ef768a0
scst_local: Port to Linux kernel v6.11
...
Support for the following driver core changes in the Linux kernel v6.11:
- d69d80484598 ("driver core: have match() callback in struct bus_type
take a const *")
2024-09-04 12:54:26 +03:00
Gleb Chesnokov
ec1b85a7e1
scst_vdisk: Port to Linux kernel v6.11
...
Support for the following block layer changes in the Linux kernel v6.11:
- e9f5f44ad372 ("block: remove the blk_integrity_profile structure")
2024-09-04 12:54:26 +03:00
Gleb Chesnokov
8c6a968083
scst_lib: Port to Linux kernel v6.11
...
Support for the following block layer changes in the Linux kernel v6.11:
- e94b45d08b5d ("block: move dma_pad_mask into queue_limits")
2024-09-04 12:54:26 +03:00
Brian M
aa086c9fb3
iscsi-scst: Add internal_portal parameter
...
Add an internal_portal parameter to allow specified portals to
bypass CHAP controls for both discovery and target login. If not
populated, then the current behavior will be preserved.
2024-08-19 17:13:00 +03:00
Gleb Chesnokov
0b00e0af96
scst_lib: Fix VPD inquiry handling on incorrect LUNs
...
When SCST receives an INQUIRY request for an incorrect LUN, it calls
scst_set_lun_not_supported_inquiry(), which returns an inquiry buffer with
a peripheral qualifier of 011b and a peripheral device type of 1Fh.
However, for a VPD inquiry, it is unable to populate the remaining fields.
According to SPC-6, if the device server cannot return the requested data,
it should terminate with CHECK CONDITION.
Reported-by: Lev Vainblat <lev@zadarastorage.com >
2024-08-19 11:10:34 +03:00
Gleb Chesnokov
7117490910
nightly build: Update kernel versions
...
Another kernel versions update.
2024-07-15 15:18:16 +03:00
Gleb Chesnokov
faa8f460d7
scst_local, qla2x00t-32gbit: Improve Linux kernel 6.10 porting
...
Fix compilation warnings, errors.
2024-07-15 15:18:16 +03:00
Gleb Chesnokov
40675cf67d
qla2x00t-32gbit: Fix debugfs output for fw_resource_count
...
DebugFS output for fw_resource_count shows:
estimate exchange used[0] high water limit [1945] n estimate iocb2 used [0] high water limit [5141]
estimate exchange2 used[0] high water limit [1945]
Which shows incorrect display due to missing newline in seq_print().
[mkp: fix checkpatch warning about space before newline]
Fixes: 5f63a163ed2f ("scsi: qla2xxx: Fix exchange oversubscription for management commands")
Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Link: https://lore.kernel.org/r/20240426020056.3639406-1-himanshu.madhani@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 998d09c5ef61 upstream ]
2024-07-15 11:54:23 +03:00
Gleb Chesnokov
ceba304d08
qla2x00t-32gbit: Avoid possible run-time warning with long model_num
...
The prior strlcpy() replacement of strncpy() here (which was
later replaced with strscpy()) expected pinfo->model_num (and
pinfo->model_description) to be NUL-terminated, but it is possible
it was not, as the code pattern here shows vha->hw->model_number (and
vha->hw->model_desc) being exactly 1 character larger, and the replaced
strncpy() was copying only up to the size of the source character
array. Replace this with memtostr(), which is the unambiguous way to
convert a maybe not-NUL-terminated character array into a NUL-terminated
string.
Fixes: 527e9b704c3d ("scsi: qla2xxx: Use memcpy() and strlcpy() instead of strcpy() and strncpy()")
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com >
Link: https://lore.kernel.org/r/20240410023155.2100422-5-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org >
[ commit c3408c4ae041 upstream ]
2024-07-15 11:54:23 +03:00
Gleb Chesnokov
d776e70d5c
qla2x00t-32gbit: Drop driver owner assignment
...
PCI core in pci_register_driver() already sets the .owner, so driver does
not need to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20240327174921.519830-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 4e64bbba5352 upstream ]
2024-07-15 11:54:23 +03:00
Gleb Chesnokov
c3bd33a34f
qla2x00t-32gbit, scst_local: Port to Linux kernel v6.10
...
Support for the following scsi layer changes in the Linux kernel v6.10:
- 5b7dfbeff92a ("scsi: core: Add a dma_alignment field to the host and
host template")
2024-07-08 13:45:29 +03:00
Gleb Chesnokov
5f4eee5fc9
scst_lib: use bdev_nr_bytes(bdev) instead of i_size_read(bdev->bd_inode)
...
Use the helper to query the size of a block device in bytes.
2024-07-08 13:45:29 +03:00
Gleb Chesnokov
ad35eef335
scst/include/backport.h: Port to Linux kernel v6.10
...
Support for the following fs layer changes in the Linux kernel v6.10:
- 7c98f7cb8fda ("remove call_{read,write}_iter() functions")
2024-07-08 13:45:29 +03:00
Gleb Chesnokov
aa2c925429
nightly build: Update kernel versions
...
Another kernel versions update.
2024-05-17 12:36:01 +03:00
Gleb Chesnokov
7c4e07414a
.github/workflows: Add a GitHub action to run regression tests upon push
...
Introduce a new GitHub action that automatically runs the
scripts/run_regression_tests script upon each push to the master branch.
2024-05-03 17:45:14 +03:00
Brian Meagher
3fba8e48e1
scst_lib: Allow REPORT LUNS to operate on an unsupported LUN
...
Initiators will attempt to send LUN 0 INQUIRY and REPORT LUNS commands
when connecting to a target.
Add scst_set_lun_not_supported_report_luns to handle the case when REPORT
LUNs is sent to an unsupported LUN.
Also, in scst_set_lun_not_supported_inquiry report a valid vendor
identification string to promote better initiator behavior.
2024-05-03 12:52:30 +03:00
Gleb Chesnokov
3e0408fca6
qla2x00t-32gbit: Fix off by one in qla_edif_app_getstats()
...
The app_reply->elem[] array is allocated earlier in this function and it
has app_req.num_ports elements. Thus this > comparison needs to be >= to
prevent memory corruption.
Fixes: 7878f22a2e03 ("scsi: qla2xxx: edif: Add getfcinfo and statistic bsgs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Link: https://lore.kernel.org/r/5c125b2f-92dd-412b-9b6f-fc3a3207bd60@moroto.mountain
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 4406e4176f47 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
6c6f6759a6
qla2x00t-32gbit: Update version to 10.02.09.200-k
...
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit b8260ca37930 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
f8f70db99b
qla2x00t-32gbit: Delay I/O Abort on PCI error
...
Currently when PCI error is detected, I/O is aborted manually through the
ABORT IOCB mechanism which is not guaranteed to succeed.
Instead, wait for the OS or system to notify driver to wind down I/O
through the pci_error_handlers api. Set eeh_busy flag to pause all traffic
and wait for I/O to drain.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-11-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 591c1fdf2016 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
b7481e82ef
qla2x00t-32gbit: Change debug message during driver unload
...
Upon driver unload, purge_mbox flag is set and the heartbeat monitor thread
detects this flag and does not send the mailbox command down to FW with a
debug message "Error detected: purge[1] eeh[0] cmd=0x0, Exiting". This
being not a real error, change the debug message.
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit b5a30840727a upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
f9329cc7e6
qla2x00t-32gbit: Fix double free of fcport
...
The server was crashing after LOGO because fcport was getting freed twice.
-----------[ cut here ]-----------
kernel BUG at mm/slub.c:371!
invalid opcode: 0000 1 SMP PTI
CPU: 35 PID: 4610 Comm: bash Kdump: loaded Tainted: G OE --------- - - 4.18.0-425.3.1.el8.x86_64 #1
Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021
RIP: 0010:set_freepointer.part.57+0x0/0x10
RSP: 0018:ffffb07107027d90 EFLAGS: 00010246
RAX: ffff9cb7e3150000 RBX: ffff9cb7e332b9c0 RCX: ffff9cb7e3150400
RDX: 0000000000001f37 RSI: 0000000000000000 RDI: ffff9cb7c0005500
RBP: fffff693448c5400 R08: 0000000080000000 R09: 0000000000000009
R10: 0000000000000000 R11: 0000000000132af0 R12: ffff9cb7c0005500
R13: ffff9cb7e3150000 R14: ffffffffc06990e0 R15: ffff9cb7ea85ea58
FS: 00007ff6b79c2740(0000) GS:ffff9cb8f7ec0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b426b7d700 CR3: 0000000169c18002 CR4: 00000000007706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
kfree+0x238/0x250
qla2x00_els_dcmd_sp_free+0x20/0x230 [qla2xxx]
? qla24xx_els_dcmd_iocb+0x607/0x690 [qla2xxx]
qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx]
? qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx]
? kernfs_fop_write+0x11e/0x1a0
Remove one of the free calls and add check for valid fcport. Also use
function qla2x00_free_fcport() instead of kfree().
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-9-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 82f522ae0d97 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
b0dd719ad2
qla2x00t-32gbit: Fix double free of the ha->vp_map pointer
...
Coverity scan reported potential risk of double free of the pointer
ha->vp_map. ha->vp_map was freed in qla2x00_mem_alloc(), and again freed
in function qla2x00_mem_free(ha).
Assign NULL to vp_map and kfree take care of NULL.
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-8-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit e288285d4778 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
5a325ea4a7
qla2x00t-32gbit: Fix command flush on cable pull
...
System crash due to command failed to flush back to SCSI layer.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 0 P4D 0
Oops: 0000 [#1 ] SMP NOPTI
CPU: 27 PID: 793455 Comm: kworker/u130:6 Kdump: loaded Tainted: G OE --------- - - 4.18.0-372.9.1.el8.x86_64 #1
Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021
Workqueue: nvme-wq nvme_fc_connect_ctrl_work [nvme_fc]
RIP: 0010:__wake_up_common+0x4c/0x190
Code: 24 10 4d 85 c9 74 0a 41 f6 01 04 0f 85 9d 00 00 00 48 8b 43 08 48 83 c3 08 4c 8d 48 e8 49 8d 41 18 48 39 c3 0f 84 f0 00 00 00 <49> 8b 41 18 89 54 24 08 31 ed 4c 8d 70 e8 45 8b 29 41 f6 c5 04 75
RSP: 0018:ffff95f3e0cb7cd0 EFLAGS: 00010086
RAX: 0000000000000000 RBX: ffff8b08d3b26328 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffff8b08d3b26320
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffffffffffe8
R10: 0000000000000000 R11: ffff95f3e0cb7a60 R12: ffff95f3e0cb7d20
R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8b2fdf6c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000002f1e410002 CR4: 00000000007706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
__wake_up_common_lock+0x7c/0xc0
qla_nvme_ls_req+0x355/0x4c0 [qla2xxx]
qla2xxx [0000:12:00.1]-f084:3: qlt_free_session_done: se_sess 0000000000000000 / sess ffff8ae1407ca000 from port 21:32:00:02:ac:07:ee:b8 loop_id 0x02 s_id 01:02:00 logout 1 keep 0 els_logo 0
? __nvme_fc_send_ls_req+0x260/0x380 [nvme_fc]
qla2xxx [0000:12:00.1]-207d:3: FCPort 21:32:00:02:ac:07:ee:b8 state transitioned from ONLINE to LOST - portid=010200.
? nvme_fc_send_ls_req.constprop.42+0x1a/0x45 [nvme_fc]
qla2xxx [0000:12:00.1]-2109:3: qla2x00_schedule_rport_del 21320002ac07eeb8. rport ffff8ae598122000 roles 1
? nvme_fc_connect_ctrl_work.cold.63+0x1e3/0xa7d [nvme_fc]
qla2xxx [0000:12:00.1]-f084:3: qlt_free_session_done: se_sess 0000000000000000 / sess ffff8ae14801e000 from port 21:32:01:02:ad:f7:ee:b8 loop_id 0x04 s_id 01:02:01 logout 1 keep 0 els_logo 0
? __switch_to+0x10c/0x450
? process_one_work+0x1a7/0x360
qla2xxx [0000:12:00.1]-207d:3: FCPort 21:32:01:02:ad:f7:ee:b8 state transitioned from ONLINE to LOST - portid=010201.
? worker_thread+0x1ce/0x390
? create_worker+0x1a0/0x1a0
qla2xxx [0000:12:00.1]-2109:3: qla2x00_schedule_rport_del 21320102adf7eeb8. rport ffff8ae3b2312800 roles 70
? kthread+0x10a/0x120
qla2xxx [0000:12:00.1]-2112:3: qla_nvme_unregister_remote_port: unregister remoteport on ffff8ae14801e000 21320102adf7eeb8
? set_kthread_struct+0x40/0x40
qla2xxx [0000:12:00.1]-2110:3: remoteport_delete of ffff8ae14801e000 21320102adf7eeb8 completed.
? ret_from_fork+0x1f/0x40
qla2xxx [0000:12:00.1]-f086:3: qlt_free_session_done: waiting for sess ffff8ae14801e000 logout
The system was under memory stress where driver was not able to allocate an
SRB to carry out error recovery of cable pull. The failure to flush causes
upper layer to start modifying scsi_cmnd. When the system frees up some
memory, the subsequent cable pull trigger another command flush. At this
point the driver access a null pointer when attempting to DMA unmap the
SGL.
Add a check to make sure commands are flush back on session tear down to
prevent the null pointer access.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit a27d4d0e7de3 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
0929d8125f
qla2x00t-32gbit: NVME|FCP prefer flag not being honored
...
Changing of [FCP|NVME] prefer flag in flash has no effect on driver. For
device that supports both FCP + NVMe over the same connection, driver
continues to connect to this device using the previous successful login
mode.
On completion of flash update, adapter will be reset. Driver will
reset the prefer flag based on setting from flash.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 69aecdd41010 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
10c4006caa
qla2x00t-32gbit: Update manufacturer detail
...
Update manufacturer detail from "Marvell Semiconductor, Inc." to
"Marvell".
Cc: stable@vger.kernel.org
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 688fa069fda6 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
869135ef83
qla2x00t-32gbit: Split FCE|EFT trace control
...
Current code combines the allocation of FCE|EFT trace buffers and enables
the features all in 1 step.
Split this step into separate steps in preparation for follow-on patch to
allow user to have a choice to enable / disable FCE trace feature.
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-4-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 76a192e1a566 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
f91f314b3a
qla2x00t-32gbit: Fix N2N stuck connection
...
Disk failed to rediscover after chip reset error injection. The chip reset
happens at the time when a PLOGI is being sent. This causes a flag to be
left on which blocks the retry. Clear the blocking flag.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 881eb861ca38 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
aabf1cedc3
qla2x00t-32gbit: Prevent command send on chip reset
...
Currently IOCBs are allowed to push through while chip reset could be in
progress. During chip reset the outstanding_cmds array is cleared
twice. Once when any command on this array is returned as failed and
secondly when the array is initialize to zero. If a command is inserted on
to the array between these intervals, then the command will be lost. Check
for chip reset before sending IOCB.
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Link: https://lore.kernel.org/r/20240227164127.36465-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 4895009c4bb7 upstream ]
2024-05-03 12:50:49 +03:00
Gleb Chesnokov
e322287f89
scst/include/backport.h: Backport DEFINE_SHOW_STORE_ATTRIBUTE()
...
Support the previous commit against kernel versions before v6.7.
See also commit 9cba82bba500 ("seq_file: add helper macro to define
attribute for rw file") # v6.7.
2024-05-03 12:50:49 +03:00