OpenCloudOS-Kernel/drivers/scsi
James Bottomley ffb5845658 scsi: mpt3sas: fix hang on ata passthrough commands
mpt3sas has a firmware failure where it can only handle one pass through
ATA command at a time.  If another comes in, contrary to the SAT
standard, it will hang until the first one completes (causing long
commands like secure erase to timeout).  The original fix was to block
the device when an ATA command came in, but this caused a regression
with

commit 669f044170
Author: Bart Van Assche <bart.vanassche@sandisk.com>
Date:   Tue Nov 22 16:17:13 2016 -0800

    scsi: srp_transport: Move queuecommand() wait code to SCSI core

So fix the original fix of the secure erase timeout by properly
returning SAM_STAT_BUSY like the SAT recommends.  The original patch
also had a concurrency problem since scsih_qcmd is lockless at that
point (this is fixed by using atomic bitops to set and test the flag).

[mkp: addressed feedback wrt. test_bit and fixed whitespace]

Fixes: 18f6084a98 (mpt3sas: Fix secure erase premature termination)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-01-17 14:36:57 -05:00
..
aacraid scsi: aacraid: switch to pci_alloc_irq_vectors 2016-11-17 20:29:55 -05:00
aic7xxx aic7xxx: Fix queue depth handling 2016-02-23 21:27:02 -05:00
aic94xx scsi: aic94xx: Add a missing call to kfree 2016-11-29 11:21:49 -05:00
arcmsr scsi: arcmsr: Use pci_alloc_irq_vectors 2016-11-08 17:29:46 -05:00
arm scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
be2iscsi SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
bfa scsi: bfa: fix wrongly initialized variable in bfad_im_bsg_els_ct_request() 2017-01-17 14:03:32 -05:00
bnx2fc scsi: libfc: Remove fc_rport_init() 2016-11-08 17:29:56 -05:00
bnx2i bnx2i: fix spelling mistake "complection" -> "completion" 2016-07-12 23:16:31 -04:00
csiostor scsi: csiostor: Fix completion usage 2016-09-14 13:19:15 -04:00
cxgbi scsi: libcxgbi: return error if interface is not up 2016-12-14 15:11:53 -05:00
cxlflash scsi: cxlflash: Migrate scsi command pointer to AFU command 2016-11-30 19:53:02 -05:00
device_handler SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
dpt
esas2r scsi: esas2r: don't reinitialize adapter's req_table 2016-08-25 22:28:17 -04:00
fcoe scsi: libfc: Remove fc_rport_init() 2016-11-08 17:29:56 -05:00
fnic scsi: fnic: Avoid sending reset to firmware when another reset is in progress 2017-01-05 20:41:31 -05:00
hisi_sas scsi: hisi_sas: support deferred probe for v2 hw 2016-12-07 18:55:58 -05:00
ibmvscsi scsi: fc: use bsg_job_done 2016-11-17 20:15:26 -05:00
ibmvscsi_tgt scsi: ibmvscsis: Issues from Dan Carpenter/Smatch 2016-11-08 17:29:54 -05:00
isci scsi: isci: switch to pci_alloc_irq_vectors 2016-12-01 08:36:17 -05:00
libfc SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
libsas SCSI misc on 20160727 2016-07-27 14:48:37 -07:00
lpfc scsi: lpfc: Set elsiocb contexts to NULL after freeing it 2017-01-17 14:14:32 -05:00
megaraid SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
mpt3sas scsi: mpt3sas: fix hang on ata passthrough commands 2017-01-17 14:36:57 -05:00
mvsas SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
osd block: split out request-only flags into a new namespace 2016-10-28 08:45:17 -06: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: pm8001: Mark symbols static where possible 2016-09-26 21:10:45 -04:00
qedi scsi: qedi: fix build, depends on UIO 2016-12-20 17:49:34 -05:00
qla2xxx scsi: qla2xxx: remove irq_affinity_notifier 2017-01-11 22:49:54 -05:00
qla4xxx scsi: qla4xxx: switch to pci_alloc_irq_vectors 2016-12-07 18:58:58 -05:00
smartpqi scsi: smartpqi: switch to pci_alloc_irq_vectors 2016-11-08 17:30:00 -05:00
snic scsi: snic: Return error code on memory allocation failure 2017-01-05 20:45:42 -05:00
sym53c8xx_2 scsi: sym53c8xx_2: Use complete() instead complete_all() 2016-09-14 13:19:29 -04:00
ufs SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
.gitignore
3w-9xxx.c scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
3w-9xxx.h scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
3w-sas.c scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
3w-sas.h scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
3w-xxxx.c scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
3w-xxxx.h scsi: Update 3ware driver email addresses 2016-12-14 15:25:12 -05:00
53c700.c scsi: remove current_cmnd field from struct scsi_device 2016-07-13 22:33:23 -04:00
53c700.h scsi: remove current_cmnd field from struct scsi_device 2016-07-13 22:33:23 -04:00
53c700.scr
53c700_d.h_shipped
BusLogic.c scsi: replace seq_printf with seq_puts 2015-02-02 09:57:45 -08:00
BusLogic.h
FlashPoint.c FlashPoint: fix build warning 2015-11-09 16:32:14 -08:00
Kconfig scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework. 2016-12-14 14:56:28 -05:00
Makefile scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework. 2016-12-14 14:56:28 -05:00
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 scsi: ncr5380: Suppress unhelpful "interrupt without IRQ bit" message 2016-11-08 17:29:48 -05:00
NCR5380.h scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
a100u2w.c scsi: a100u2w: trivial typo in printk 2015-08-07 15:03:42 +02:00
a100u2w.h
a2091.c zorro: ZTWO_VADDR() should return "void __iomem *" 2013-11-26 11:09:07 +01:00
a2091.h
a3000.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
a3000.h
a4000t.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
advansys.c scsi: advansys: fix build warning for PCI=n 2016-11-08 17:29:58 -05: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: aha1542: avoid uninitialized variable warnings 2016-02-23 21:27:02 -05: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_scsi.c scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
atp870u.c atp870u: Introduce atp870_init() 2015-11-25 22:08:55 -05:00
atp870u.h atp870u: Remove scam_on from struct atp_unit 2015-11-25 22:08:52 -05:00
bvme6000_scsi.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
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 scsi: fix upper bounds check of sense key in scsi_sense_key_string() 2016-08-16 00:49:32 -04:00
dc395x.c scsi: print single-character strings with seq_putc 2015-02-02 09:57:46 -08:00
dc395x.h
dmx3191d.c scsi: dmx3191d: use module_pci_driver 2016-11-16 20:43:50 -05:00
dpt_i2o.c scsi: dpt_i2o: double free on error path 2016-11-30 19:53:58 -05:00
dpti.h scsi: use 64-bit LUNs 2014-07-17 22:07:37 +02:00
eata.c scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
eata_generic.h
eata_pio.c eata_pio: missing break statement 2016-05-10 22:01:07 -04:00
eata_pio.h
esp_scsi.c scsi: use host wide tags by default 2015-11-09 17:11:57 -08:00
esp_scsi.h esp_scsi: correctly detect am53c974 2014-11-24 16:13:16 +01:00
fdomain.c scsi: fdomain: drop fdomain_pci_tbl when built-in 2016-02-23 21:27:02 -05:00
fdomain.h
g_NCR5380.c scsi: g_NCR5380: Fix release_region in error handling 2016-11-12 10:42:44 -05:00
g_NCR5380.h scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
gdth.c gdth: replace struct timeval with ktime_get_real_seconds() 2016-02-25 21:16:49 -05:00
gdth.h
gdth_ioctl.h
gdth_proc.c gdth: replace struct timeval with ktime_get_real_seconds() 2016-02-25 21:16:49 -05:00
gdth_proc.h
gvp11.c zorro: ZTWO_VADDR() should return "void __iomem *" 2013-11-26 11:09:07 +01:00
gvp11.h
hosts.c SCSI misc on 20161006 2016-10-07 09:28:53 -07:00
hpsa.c scsi: hpsa: remove memory allocate failure message 2016-12-14 15:33:13 -05:00
hpsa.h SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
hpsa_cmd.h scsi: hpsa: Check for vpd support before sending 2016-09-14 14:19:31 -04: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 imm: check parport_claim 2016-02-25 21:10:53 -05:00
imm.h
initio.c SCSI: initio: remove duplicate module device table 2015-11-20 11:39:03 -05:00
initio.h
ipr.c scsi: ipr: Fix runaway IRQs when falling back from MSI to LSI 2016-11-30 19:58:04 -05:00
ipr.h scsi: ipr: Use pci_irq_allocate_vectors 2016-11-08 17:29:46 -05:00
ips.c scsi: ips: don't use custom hex_asc_upper[] table 2016-11-08 17:29:57 -05:00
ips.h
iscsi_boot_sysfs.c ibft: Expose iBFT acpi header via sysfs 2016-05-16 11:14:29 -04:00
iscsi_tcp.c scsi_tcp: block BH in TCP callbacks 2016-05-19 11:36:49 -07:00
iscsi_tcp.h iscsi_tcp: Use ahash 2016-01-27 20:36:10 +08:00
jazz_esp.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
lasi700.c
libiscsi.c scsi: libiscsi: Fix locking in __iscsi_conn_send_pdu 2016-10-17 13:34:44 -04:00
libiscsi_tcp.c iscsi_tcp: Use ahash 2016-01-27 20:36:10 +08:00
mac53c94.c PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
mac53c94.h
mac_esp.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
mac_scsi.c scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
megaraid.c megaraid : use dev_printk when possible 2015-08-26 07:23:04 -07:00
megaraid.h [SCSI] megaraid: simplify internal command handling 2014-03-27 08:26:31 -07:00
mesh.c PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
mesh.h
mvme16x_scsi.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
mvme147.c
mvme147.h
mvumi.c scsi: mvumi: use __maybe_unused to hide pm functions 2016-03-05 17:07:46 -05:00
mvumi.h
ncr53c8xx.c scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
ncr53c8xx.h scsi: Remove CONFIG_SCSI_MULTI_LUN 2014-07-17 22:07:35 +02:00
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 block: split out request-only flags into a new namespace 2016-10-28 08:45:17 -06:00
osst.h
osst_detect.h
osst_options.h
pmcraid.c SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
pmcraid.h
ppa.c scsi: ppa: use new parport device model 2016-02-23 21:27:02 -05: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 qla1280: Don't allocate 512kb of host tags 2016-04-30 09:25:26 -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 qlogicpti: Return correct error code 2016-03-01 20:06:49 -05:00
qlogicpti.h qlogicpti: Fix compiler warnings 2016-11-28 15:51:31 -05:00
raid_class.c
script_asm.pl
scsi.c block: add code to track actual device queue depth 2016-11-05 17:09:53 -06:00
scsi.h
scsi_common.c scsi: add scsi_set_sense_field_pointer() 2016-04-04 12:07:42 -04:00
scsi_debug.c scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded 2016-10-26 22:14:50 -04:00
scsi_devinfo.c scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices 2016-12-07 18:13:52 -05:00
scsi_dh.c scsi: Replace wrong device handler name for CLARiiON arrays 2016-10-11 17:56:51 -04:00
scsi_error.c block: split out request-only flags into a new namespace 2016-10-28 08:45:17 -06:00
scsi_ioctl.c scsi: return EAGAIN when resetting a device under EH 2014-11-12 11:16:12 +01:00
scsi_lib.c scsi: scsi-mq: Wait for .queue_rq() if necessary 2016-12-20 17:01:28 -05:00
scsi_lib_dma.c
scsi_logging.c scsi_logging: return void for dev_printk() functions 2015-02-04 08:00:24 -08:00
scsi_logging.h scsi: simplify scsi_log_(send|completion) 2014-11-12 11:16:05 +01:00
scsi_module.c
scsi_netlink.c net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-04-24 13:44:54 -04:00
scsi_pm.c scsi: Set request queue runtime PM status back to active on resume 2016-02-19 10:52:45 -05:00
scsi_priv.h SCSI misc on 20161006 2016-10-07 09:28:53 -07:00
scsi_proc.c scsi: disable automatic target scan 2016-04-11 16:57:09 -04:00
scsi_sas_internal.h scsi_transport_sas: add 'scsi_target_id' sysfs attribute 2016-03-14 21:05:04 -04:00
scsi_scan.c scsi: Remove one useless stack variable 2016-10-11 18:02:09 -04:00
scsi_sysctl.c scsi: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:16 -07:00
scsi_sysfs.c scsi: avoid a permanent stop of the scsi device's request queue 2016-12-14 15:51:17 -05:00
scsi_trace.c scsi-trace: define ZBC_IN and ZBC_OUT 2016-04-11 16:57:09 -04:00
scsi_transport_api.h
scsi_transport_fc.c scsi: fc: move FC transport's bsg code to bsg-lib 2016-11-17 20:15:26 -05:00
scsi_transport_iscsi.c scsi_transport_iscsi: Declare local symbols static 2016-04-11 16:57:09 -04:00
scsi_transport_sas.c scsi: sas: remove is_sas_attached() 2016-08-18 22:23:20 -04:00
scsi_transport_spi.c [SCSI] Fix printk typos in drivers/scsi 2015-08-07 14:28:45 +02:00
scsi_transport_srp.c scsi: srp_transport: Move queuecommand() wait code to SCSI core 2016-11-29 11:21:27 -05:00
scsi_typedefs.h
scsicam.c scsi: PC partition tables are little endian 2014-11-12 11:15:54 +01:00
sd.c scsi: sd: Ignore zoned field for host-managed devices 2017-01-17 14:06:22 -05:00
sd.h sd: Implement support for ZBC devices 2016-10-18 19:49:11 -06:00
sd_dif.c scsi: sd: Move DIF protection types to t10-pi.h 2016-09-15 09:51:14 -04:00
sd_zbc.c sd_zbc: Force use of READ16/WRITE16 2016-11-14 13:16:42 -07:00
sense_codes.h scsi: move Additional Sense Codes to separate file 2016-04-11 16:57:09 -04:00
ses.c scsi: ses: Fix SAS device detection in enclosure 2017-01-17 13:58:57 -05:00
sg.c scsi: sg: Use mult_frac, drop MULDIV macro 2016-08-30 22:18:59 -04:00
sgiwd93.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
sim710.c scsi: sim710: fix build warning 2016-02-23 21:27:02 -05:00
sni_53c710.c scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
sr.c scsi: sr: constify sr_pm_ops structure 2016-09-04 01:28:08 -04:00
sr.h scsi: introduce sdev_prefix_printk() 2014-11-12 11:15:57 +01:00
sr_ioctl.c sr: reduce debug noise in sr_do_ioctl 2015-01-20 19:43:24 +01:00
sr_vendor.c scsi: Implement sr_printk() 2014-07-17 22:07:39 +02:00
st.c Merge branch 'for-4.10/block' of git://git.kernel.dk/linux-block 2016-12-13 10:19:16 -08:00
st.h st: Remove obsolete scsi_tape.max_pfn 2015-11-18 11:59:09 -05:00
st_options.h
stex.c stex: Add S3/S4 support 2016-02-23 21:27:02 -05:00
storvsc_drv.c scsi: storvsc: Payload buffer incorrectly sized for 32 bit kernels. 2016-11-30 11:38:24 -05:00
sun3_scsi.c scsi: ncr5380: Use correct types for DMA routines 2016-11-08 17:29:48 -05:00
sun3_scsi.h sun3_scsi: Move macro definitions 2014-11-20 09:11:15 +01:00
sun3_scsi_vme.c scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.c 2014-05-28 12:16:28 +02:00
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 scsi: drop owner assignment from platform_drivers 2014-10-20 16:21:33 +02:00
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
virtio_scsi.c SCSI misc on 20161006 2016-10-07 09:28:53 -07:00
vmw_pvscsi.c scsi: vmw_pvscsi: return SUCCESS for successful command aborts 2016-11-01 13:31:23 -04:00
vmw_pvscsi.h scsi: vmw_pvscsi: return SUCCESS for successful command aborts 2016-11-01 13:31:23 -04:00
wd33c93.c scsi: print single-character strings with seq_putc 2015-02-02 09:57:46 -08:00
wd33c93.h
wd719x.c drivers/scsi/wd719x.c: remove last declaration using DEFINE_PCI_DEVICE_TABLE 2016-09-01 17:52:01 -07:00
wd719x.h scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
xen-scsifront.c xen/scsifront: don't request a slot on the ring until request is ready 2016-12-09 10:59:13 +01:00
zalon.c
zorro7xx.c zorro: ZTWO_VADDR() should return "void __iomem *" 2013-11-26 11:09:07 +01:00