alistair23-linux/drivers/scsi/qla2xxx
Dilip Kumar Uppugandla 3bb67df5b5 qla2xxx: Check for online flag instead of active reset when transmitting responses
Driver has following initialization sequence for Target mode

1. Driver initialization starts

2. ISP Abort is scheduled when the target is enabled.

qla2xxx [0000:04:00.0]-4807:25: ISP abort scheduled
qla2xxx [0000:04:00.0]-00af:25: Performing ISP error recovery - ha=ffff880caa9e0000.

3. DPC thread starts the ISP Abort

4. While DPC is resetting the chip and initializing the firmware, we get
   async events from the firmware about P2P mode, LOOP UP and PORT UPDATE.

5. PRLI from a initiator is delivered to us followed by a PLOGI and then a
   SCSI command which creates a session.

6. If the SCSI command is a WRITE in this case, we issue XFR RDY and it
   gets dropped as can be seen with messages RESET-XFR because ISP Abort
   is still active

qla2xxx [0000:04:00.0]-e902:25: RESET-XFR active/old-count/new-count = 1/1/1.

7. If the SCSI command is a READ, we issue RESPONSE and they get dropped
   as well because Abort is still active.

qla2xxx [0000:04:00.0]-e901:25: RESET-RSP active/old-count/new-count = 1/1/1

8. Now eventually, ISP Abort finishes clearing the DPC flags.

qla2xxx [0000:04:00.0]-8822:25: qla2x00_abort_isp succeeded.
qla2xxx [0000:04:00.0]-4808:25: ISP abort end.

9. Since we dropped SCSI commands silently (without any responses sent
   to the initiator) initiator waits for a SCSI timeout (which is 60
   seconds in our case), Sends an ABTS which fails since there
   no se_cmd found for the tag that ABTS is referencing as the
   commands were cleaned up in Step 6 and 7.

10. Initiator send an IO after the ABTS which succeed fine.

To fix the above case, the following changes have been made:
  - To prevent target from dropping commands silently, use the online flag
    instead to check for an active chip reset. Once the port is online during
    a chip reset phase, we are good to process the commands.
  - Clean up qla2x00_restart_isp to not set the online flag and process ATIO
    as it is unnecessary. During a chip reset, interrupts are enabled only
    after setting the online flag to 1, so ATIO's won't be missed and hence
    no need to process ATIO's after setting the online flag.

Signed-off-by: Dilip Kumar Uppugandla <dilip@purestorage.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2016-01-07 13:57:50 -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: Wait for all conflicts before ack'ing PLOGI 2016-01-07 13:57:44 -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: Set all queues to 4k 2016-01-07 13:57:49 -08:00
qla_devtbl.h [SCSI] qla2xxx: fix Kernel Panic with Qlogic 2472 Card. 2009-02-10 11:15:18 -05:00
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: Move atioq to a different lock to reduce lock contention 2016-01-07 13:57:48 -08:00
qla_gs.c qla2xxx: Remove __constant_ prefix 2015-08-26 10:40:32 -07:00
qla_init.c qla2xxx: Check for online flag instead of active reset when transmitting responses 2016-01-07 13:57:50 -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: Move atioq to a different lock to reduce lock contention 2016-01-07 13:57:48 -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_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_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_os.c qla2xxx: Set all queues to 4k 2016-01-07 13:57:49 -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: Check for online flag instead of active reset when transmitting responses 2016-01-07 13:57:50 -08:00
qla_target.h qla2xxx: Move atioq to a different lock to reduce lock contention 2016-01-07 13:57:48 -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 selective command queuing 2016-01-07 13:57:47 -08:00
tcm_qla2xxx.h target: move transport ID handling to the core 2015-05-30 22:42:30 -07:00