SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 23 Oct 2013 10:25:40 +0000 (06:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2013 06:37:55 +0000 (22:37 -0800)
commitaaca4317a24698e7ab51f1f64f1ab099b7521202
tree955be46c65e1acda71c1130248347fed968e692d
parent6b3018c7695508599812528b7e7604ba4b7534d5
SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers

commit 54b2b50c20a61b51199bedb6e5d2f8ec2568fb43 upstream.

Some host adapters do not pass commands through to the target disk
directly. Instead they provide an emulated target which may or may not
accurately report its capabilities. In some cases the physical device
characteristics are reported even when the host adapter is processing
commands on the device's behalf. This can lead to adapter firmware hangs
or excessive I/O errors.

This patch disables WRITE SAME for devices connected to host adapters
that provide an emulated target. Driver writers can disable WRITE SAME
by setting the no_write_same flag in the host adapter template.

[jejb: fix up rejections due to eh_deadline patch]
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 files changed:
drivers/ata/libata-scsi.c
drivers/firewire/sbp2.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-sas.c
drivers/scsi/3w-xxxx.c
drivers/scsi/aacraid/linit.c
drivers/scsi/arcmsr/arcmsr_hba.c
drivers/scsi/gdth.c
drivers/scsi/hosts.c
drivers/scsi/hpsa.c
drivers/scsi/ipr.c
drivers/scsi/ips.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/pmcraid.c
drivers/scsi/sd.c
drivers/scsi/storvsc_drv.c
include/scsi/scsi_host.h