linux/drivers/scsi/qla2xxx
Dmitry Bogdanov 2ef7665dfd scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal
Target de-configuration panics at high CPU load because TPGT and WWPN can
be removed on separate threads.

TPGT removal requests a reset HBA on a separate thread and waits for reset
complete (phase1). Due to high CPU load that HBA reset can be delayed for
some time.

WWPN removal does qlt_stop_phase2(). There it is believed that phase1 has
already completed and thus tgt.tgt_ops is subsequently cleared. However,
tgt.tgt_ops is needed to process incoming traffic and therefore this will
cause one of the following panics:

NIP qlt_reset+0x7c/0x220 [qla2xxx]
LR  qlt_reset+0x68/0x220 [qla2xxx]
Call Trace:
0xc000003ffff63a78 (unreliable)
qlt_handle_imm_notify+0x800/0x10c0 [qla2xxx]
qlt_24xx_atio_pkt+0x208/0x590 [qla2xxx]
qlt_24xx_process_atio_queue+0x33c/0x7a0 [qla2xxx]
qla83xx_msix_atio_q+0x54/0x90 [qla2xxx]

or

NIP qlt_24xx_handle_abts+0xd0/0x2a0 [qla2xxx]
LR  qlt_24xx_handle_abts+0xb4/0x2a0 [qla2xxx]
Call Trace:
qlt_24xx_handle_abts+0x90/0x2a0 [qla2xxx] (unreliable)
qlt_24xx_process_atio_queue+0x500/0x7a0 [qla2xxx]
qla83xx_msix_atio_q+0x54/0x90 [qla2xxx]

or

NIP qlt_create_sess+0x90/0x4e0 [qla2xxx]
LR  qla24xx_do_nack_work+0xa8/0x180 [qla2xxx]
Call Trace:
0xc0000000348fba30 (unreliable)
qla24xx_do_nack_work+0xa8/0x180 [qla2xxx]
qla2x00_do_work+0x674/0xbf0 [qla2xxx]
qla2x00_iocb_work_fn

The patch fixes the issue by serializing qlt_stop_phase1() and
qlt_stop_phase2() functions to make WWPN removal wait for phase1
completion.

Link: https://lore.kernel.org/r/20210415203554.27890-1-d.bogdanov@yadro.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-21 23:38:57 -04:00
..
Kconfig
Makefile
qla_attr.c scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats() 2021-03-24 21:47:21 -04:00
qla_bsg.c scsi: qla2xxx: Reuse existing error handling path 2021-04-13 00:38:58 -04:00
qla_bsg.h scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port 2021-01-13 00:25:19 -05:00
qla_dbg.c scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_dbg.h scsi: qla2xxx: Update default AER debug mask 2021-03-29 22:38:58 -04:00
qla_def.h scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_devtbl.h
qla_dfs.c scsi: qla2xxx: Remove unnecessary NULL check 2021-01-22 22:04:16 -05:00
qla_dsd.h
qla_fw.h scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe 2021-01-13 00:25:20 -05:00
qla_gbl.h scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_gs.c scsi: qla2xxx: Do logout even if fabric scan retries got exhausted 2021-03-29 22:38:59 -04:00
qla_init.c scsi: qla2xxx: Prevent PRLI in target mode 2021-04-28 22:55:01 -04:00
qla_inline.h scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_iocb.c scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_isr.c scsi: qla2xxx: Reserve extra IRQ vectors 2021-04-15 22:06:03 -04:00
qla_mbx.c scsi: qla2xxx: Fix mailbox recovery during PCIe error 2021-03-29 22:38:58 -04:00
qla_mid.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_mr.c scsi: qla2xxx: Suppress Coverity complaints about dseg_r* 2021-03-24 21:47:20 -04:00
qla_mr.h scsi: qla2xxx: Suppress Coverity complaints about dseg_r* 2021-03-24 21:47:20 -04:00
qla_nvme.c scsi: qla2xxx: Fix crash in PCIe error handling 2021-03-29 22:38:58 -04:00
qla_nvme.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_nx2.c scsi: qla2xxx: Simplify qla8044_minidump_process_control() 2021-03-24 21:47:21 -04:00
qla_nx2.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_nx.c scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() 2021-05-15 17:20:28 -04:00
qla_nx.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_os.c scsi: qla2xxx: Add marginal path handling support 2021-04-28 22:55:01 -04:00
qla_settings.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_sup.c scsi: qla2xxx: Fix endianness annotations 2021-03-24 21:47:20 -04:00
qla_target.c scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal 2021-05-21 23:38:57 -04:00
qla_target.h scsi: qla2xxx: Fix broken #endif placement 2021-03-15 22:53:24 -04:00
qla_tmpl.c SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
qla_tmpl.h scsi: qla2xxx: Fix crash during driver load on big endian machines 2020-12-09 11:34:17 -05:00
qla_version.h scsi: qla2xxx: Update version to 10.02.00.106-k 2021-03-29 22:38:59 -04:00
tcm_qla2xxx.c Merge branch '5.12/scsi-fixes' into 5.13/scsi-staging 2021-04-05 22:57:29 -04:00
tcm_qla2xxx.h