linux/drivers/scsi/qla2xxx
Alexei Potashnik 71cdc07964 qla2xxx: Delete session if initiator is gone from FW
1. Initiator A is logged in with fc_id(1)/loop_id(1)
2. Initiator A re-logs in with fc_id(2)/loop_id(2)
3. Part of old session deletion async logoout for 1/1 is queued
4. Initiator B logs in with fc_id(1)/loop_id(1), starts
   passing data and creates session.
5. Async logo from 3 is processed by DPC and sent to FW

Now initiator B has the session but is logged out from FW.

This condition is detected first with CTIO error 29 at which
point we should delete current session. During session
deletion we will send LOGO to initiator to force re-login.

Under rare circumstances initiator might be logged out of FW,
not have driver session, but still think it's logged in.
E.g. the above sequence plus session deletion due to re-config.
Incoming commands will fail to create local session because
initiator is not found in FW. In this case we also issue LOGO
to initiator to force him re-login.

Finally this patch fixes exchange leak when commands where
received in logged out state. In this case loop_id must be
set to FFFF when corresponding exchange is terminated. The
patch modifies exchange termination to always use FFFF,
since in certain scenarios it's impossible to tell whether
command was received in logged in or logged out state.

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Acked-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2016-01-07 13:57:44 -08:00
..
Kconfig qla2xxx: Update tcm_qla2xxx module description to 24xx+ 2015-08-02 22:41:14 -07:00
Makefile [SCSI] qla2xxx: Add support for ISP2071. 2014-03-15 10:18:50 -07:00
qla_attr.c qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_bsg.c qla2xxx: Remove set-but-not-used variables 2015-08-26 10:34:49 -07:00
qla_bsg.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_dbg.c qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_dbg.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_def.h qla2xxx: Delete session if initiator is gone from FW 2016-01-07 13:57:44 -08:00
qla_devtbl.h
qla_dfs.c qla2xxx: Add FW resource count in DebugFS. 2016-01-07 13:57:42 -08:00
qla_fw.h qla2xxx: Honor FCP_RSP retry delay timer field. 2014-09-25 14:25:04 +02:00
qla_gbl.h qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_gs.c qla2xxx: Remove __constant_ prefix 2015-08-26 10:40:32 -07:00
qla_init.c qla2xxx: Add FW resource count in DebugFS. 2016-01-07 13:57:42 -08:00
qla_inline.h qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_iocb.c qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_isr.c qla2xxx: Added interface to send explicit LOGO. 2016-01-07 13:57:43 -08:00
qla_mbx.c qla2xxx: Add FW resource count in DebugFS. 2016-01-07 13:57:42 -08:00
qla_mid.c qla2xxx: Remove set-but-not-used variables 2015-08-26 10:34:49 -07:00
qla_mr.c qla2xxx: Fix sparse annotations 2015-08-26 10:42:25 -07:00
qla_mr.h qla2xxx: Adjust adapter reset routine to the changes in firmware specification for ISPFx00. 2014-05-19 13:31:03 +02:00
qla_nx2.c qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_nx2.h qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_nx.c qla2xxx: Avoid that sparse complains about context imbalances 2015-08-26 10:46:04 -07:00
qla_nx.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_os.c qla2xxx: Delete session if initiator is gone from FW 2016-01-07 13:57:44 -08:00
qla_settings.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_sup.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_target.c qla2xxx: Delete session if initiator is gone from FW 2016-01-07 13:57:44 -08:00
qla_target.h qla2xxx: Delete session if initiator is gone from FW 2016-01-07 13:57:44 -08:00
qla_tmpl.c qla2xxx: Avoid that sparse complains about context imbalances 2015-08-26 10:46:04 -07:00
qla_tmpl.h qla2xxx: ISP27xx fwdump template error print simplification. 2014-09-25 14:25:02 +02:00
qla_version.h qla2xxx: Update driver version to 8.07.00.26-k 2015-08-26 17:51:01 -07:00
tcm_qla2xxx.c qla2xxx: Add FW resource count in DebugFS. 2016-01-07 13:57:42 -08:00
tcm_qla2xxx.h target: move transport ID handling to the core 2015-05-30 22:42:30 -07:00