OpenCloudOS-Kernel/drivers/scsi/mpt3sas
Chaitra P B f49d4aed13 scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag.
1. In IO path, setting of "ATA command pending" flag early before device
   removal, invalid device handle etc., checks causes any new commands
   to be always returned with SAM_STAT_BUSY and when the driver removes
   the drive the SML issues SYNC Cache command and that command is
   always returned with SAM_STAT_BUSY and thus making SYNC Cache command
   to requeued.

2. If the driver gets an ATA PT command for a SATA drive then the driver
   set "ATA command pending" flag in device specific data structure not
   to allow any further commands until the ATA PT command is completed.
   However, after setting the flag if the driver decides to return the
   command back to upper layers without actually issuing to the firmware
   (i.e., returns from qcmd failure return paths) then the corresponding
   flag is not cleared and this prevents the driver from sending any new
   commands to the drive.

This patch fixes above two issues by setting of "ATA command pending"
flag after checking for whether device deleted, invalid device handle,
device busy with task management. And by setting "ATA command pending"
flag to false in all of the qcmd failure return paths after setting the
flag.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03 23:08:01 -05:00
..
mpi SCSI misc on 20171114 2017-11-14 16:23:44 -08:00
Kconfig mpt3sas: fix Kconfig dependency problem for mpt2sas back compatibility 2015-12-03 09:31:23 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpt3sas_base.c scsi: mpt3sas: Replace PCI pool old API 2017-12-04 22:56:00 -05:00
mpt3sas_base.h scsi: mpt3sas: fix dma_addr_t casts 2017-11-06 23:01:53 -05:00
mpt3sas_config.c scsi: mpt3sas: API 's to support NVMe drive addition to SML 2017-11-03 12:20:52 -04:00
mpt3sas_ctl.c scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info 2017-11-03 12:20:52 -04:00
mpt3sas_ctl.h scripts/spelling.txt: add "overwritting" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
mpt3sas_debug.h mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig 2015-11-11 18:31:14 -05:00
mpt3sas_scsih.c scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag. 2018-01-03 23:08:01 -05:00
mpt3sas_transport.c scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough 2017-08-29 21:51:45 -04:00
mpt3sas_trigger_diag.c mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_trigger_diag.h mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_warpdrive.c scsi: mpt3sas: SGL to PRP Translation for I/Os to NVMe devices 2017-11-03 12:20:52 -04:00