alistair23-linux/drivers/scsi
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
..
aacraid aacraid: Update driver version 2015-11-09 16:12:56 -08:00
aic7xxx scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
aic94xx SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
arcmsr libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
arm scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
be2iscsi SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
bfa scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
bnx2fc bnx2fc: Update version number to 2.9.6. 2015-11-09 17:32:34 -08:00
bnx2i bnx2i: Fix call trace while device reset 2015-06-02 17:15:24 -07:00
csiostor scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
cxgbi drivers/scsi/cxgbi: fix build with EXTRA_CFLAGS 2015-11-09 15:11:24 -08:00
cxlflash cxlflash: Fix to avoid bypassing context cleanup 2015-10-30 17:25:34 +09:00
device_handler scsi_dh: kill struct scsi_dh_data 2015-08-28 13:14:57 -07:00
dpt
esas2r scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
fcoe scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
fnic scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
ibmvscsi SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
isci SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
libfc libfc: Use the correct function name in kernel-doc comment. 2015-11-09 17:15:52 -08:00
libsas Merge branch 'for-4.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-03-24 17:08:29 -07:00
lpfc scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
megaraid SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
mpt3sas mpt3sas: fix inline markers on non inline function declarations 2015-11-12 21:58:46 -05:00
mvsas SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
osd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-04-14 09:50:27 -07:00
pcmcia scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
pm8001 SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
qla2xxx qla2xxx: Check for online flag instead of active reset when transmitting responses 2016-01-07 13:57:50 -08:00
qla4xxx SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
snic SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
sym53c8xx_2
ufs SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
.gitignore
3w-9xxx.c 3w-9xxx: don't unmap bounce buffered commands 2015-10-07 10:24:48 -07:00
3w-9xxx.h 3w-9xxx: fix command completion race 2015-04-27 10:10:19 -07:00
3w-sas.c 3w-sas: fix command completion race 2015-04-27 10:04:39 -07:00
3w-sas.h 3w-sas: fix command completion race 2015-04-27 10:04:39 -07:00
3w-xxxx.c 3w-xxxx: fix command completion race 2015-04-27 10:05:55 -07:00
3w-xxxx.h 3w-xxxx: fix command completion race 2015-04-27 10:05:55 -07:00
53c700.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c scsi: a100u2w: trivial typo in printk 2015-08-07 15:03:42 +02:00
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
aha152x.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
aha152x.h
aha1542.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
aha1542.h aha1542: fix include guard and remove useless changelog 2015-04-09 18:08:31 -07:00
aha1740.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
aha1740.h scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
am53c974.c am53c974: Fix crash during modprobe 2015-04-17 10:13:56 -07:00
atari_NCR5380.c ncr5380: Harmonize jiffies conversion with msecs_to_jiffies 2015-03-09 10:45:26 -04:00
atari_scsi.c ncr5380: Drop owner assignment from platform_drivers 2015-03-09 07:18:14 -04:00
atp870u.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
atp870u.h scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-04-14 09:50:27 -07:00
constants.c
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c x86/vm86: Clean up vm86.h includes 2015-07-31 13:31:10 +02:00
dpti.h
dtc.c
dtc.h
eata.c
eata_generic.h
eata_pio.c
eata_pio.h
esp_scsi.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
esp_scsi.h
fdomain.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
fdomain.h
FlashPoint.c FlashPoint: fix build warning 2015-11-09 16:32:14 -08:00
g_NCR5380.c ncr5380: Harmonize jiffies conversion with msecs_to_jiffies 2015-03-09 10:45:26 -04:00
g_NCR5380.h
g_NCR5380_mmio.c
gdth.c
gdth.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gvp11.c
gvp11.h
hosts.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
hpsa.c SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
hpsa.h hpsa: add in sas transport class 2015-11-09 12:39:28 -05:00
hpsa_cmd.h hpsa: add in sas transport class 2015-11-09 12:39:28 -05:00
hptiop.c hptiop: Support HighPoint RR36xx HBAs and Support SAS tape and SAS media changer 2015-08-12 13:14:57 -07:00
hptiop.h hptiop: Support HighPoint RR36xx HBAs and Support SAS tape and SAS media changer 2015-08-12 13:14:57 -07:00
imm.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
imm.h
in2000.c
in2000.h
initio.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
initio.h
ipr.c SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
ipr.h ipr: Driver version 2.6.3. 2015-11-09 19:32:41 -05:00
ips.c ips: remove pointless #warning 2015-06-02 17:24:54 -07:00
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c
iscsi_tcp.h
jazz_esp.c
Kconfig SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
lasi700.c
libiscsi.c libiscsi: Fix iscsi_check_transport_timeouts possible infinite loop 2015-09-17 07:25:02 -07:00
libiscsi_tcp.c
mac53c94.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
mac53c94.h
mac_esp.c
mac_scsi.c ncr5380: Drop owner assignment from platform_drivers 2015-03-09 07:18:14 -04:00
Makefile mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs 2015-11-11 19:50:11 -05:00
megaraid.c megaraid : use dev_printk when possible 2015-08-26 07:23:04 -07:00
megaraid.h
mesh.c powerpc: Move Power Macintosh drivers to generic byteswappers 2015-03-23 14:29:40 +11:00
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c mvumi: 64bit value for seconds_since1970 2015-11-11 20:45:23 -05:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
NCR5380.c ncr5380: Harmonize jiffies conversion with msecs_to_jiffies 2015-03-09 10:45:26 -04:00
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
nsp32.h
nsp32_debug.c
nsp32_io.h
osst.c
osst.h
osst_detect.h
osst_options.h
pas16.c
pas16.h
pmcraid.c SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
pmcraid.h
ppa.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
ppa.h
ps3rom.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
qla1280.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
qla1280.h
qlogicfas.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
qlogicfas408.c
qlogicfas408.h
qlogicpti.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
scsi.h
scsi_common.c scsi: Protect against buffer possible overflow in scsi_set_sense_information 2015-07-23 22:53:05 -07:00
scsi_debug.c scsi_debug: resp_request: remove unused variable 2015-09-06 11:03:14 -07:00
scsi_devinfo.c SCSI: fix bug in scsi_dev_info_list matching 2015-10-27 11:09:41 +09:00
scsi_dh.c scsi_dh: don't try to load a device handler during async probing 2015-10-27 15:03:31 +09:00
scsi_error.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
scsi_ioctl.c
scsi_lib.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_pm.c SCSI: Fix NULL pointer dereference in runtime PM 2015-08-18 08:14:14 -07:00
scsi_priv.h scsi_dh: fix use-after-free when removing scsi device 2015-10-27 11:22:37 +09:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c SCSI queue for 4.4. 2015-11-12 07:06:18 -05:00
scsi_sysctl.c
scsi_sysfs.c SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c scsi_transport_fc: Add support for 25Gbit speed 2015-04-10 07:40:32 -07:00
scsi_transport_iscsi.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
scsi_transport_sas.c scsi_transport_sas: Remove check for SAS expander when querying bay/enclosure IDs. 2015-09-06 11:13:41 -07:00
scsi_transport_spi.c [SCSI] Fix printk typos in drivers/scsi 2015-08-07 14:28:45 +02:00
scsi_transport_srp.c IB/srp: Avoid using uninitialized variable 2015-07-14 13:20:09 -04:00
scsi_typedefs.h
scsicam.c
sd.c SCSI misc on 20151113 2015-11-13 20:35:54 -08:00
sd.h
sd_dif.c block: Consolidate static integrity profile properties 2015-10-21 14:42:38 -06:00
ses.c
sg.c sg: Fix double-free when drives detach during SG_IO 2015-11-02 23:51:25 -05:00
sgiwd93.c
sim710.c
sni_53c710.c
sr.c
sr.h
sr_ioctl.c
sr_vendor.c
st.c st: allow debug output to be enabled or disabled via sysfs 2015-11-09 17:17:27 -08:00
st.h st: implement tape statistics 2015-06-02 08:03:25 -07:00
st_options.h
stex.c stex: Remove use of struct timeval 2015-11-09 17:42:19 -08:00
storvsc_drv.c scsi: storvsc: Fix a bug in the handling of SRB status flags 2015-11-09 16:29:42 -08:00
sun3_scsi.c ncr5380: Drop owner assignment from platform_drivers 2015-03-09 07:18:14 -04:00
sun3_scsi.h
sun3_scsi_vme.c
sun3x_esp.c arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> instead 2015-08-10 23:07:05 -04:00
sun_esp.c
sym53c416.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
sym53c416.h
t128.c
t128.h
u14-34f.c
ultrastor.c
ultrastor.h
virtio_scsi.c virtio/vhost: fixes for 4.2 2015-07-23 13:07:04 -07:00
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c [SCSI] Fix printk typos in drivers/scsi 2015-08-07 14:28:45 +02:00
wd719x.h scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
wd7000.c
xen-scsifront.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
zalon.c
zorro7xx.c