summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/storvsc_drv.c
diff options
context:
space:
mode:
authorMartin K. Petersen2013-10-23 12:25:40 +0200
committerJames Bottomley2013-11-29 05:48:39 +0100
commit54b2b50c20a61b51199bedb6e5d2f8ec2568fb43 (patch)
tree8bff3a0f9bc3a5577cb4191ee8043aa98d081b87 /drivers/scsi/storvsc_drv.c
parent[SCSI] libsas: fix usage of ata_tf_to_fis (diff)
downloadkernel-qcow2-linux-54b2b50c20a61b51199bedb6e5d2f8ec2568fb43.tar.gz
kernel-qcow2-linux-54b2b50c20a61b51199bedb6e5d2f8ec2568fb43.tar.xz
kernel-qcow2-linux-54b2b50c20a61b51199bedb6e5d2f8ec2568fb43.zip
[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
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> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r--drivers/scsi/storvsc_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 1a28f5632797..17d740427240 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1697,6 +1697,7 @@ static struct scsi_host_template scsi_driver = {
.use_clustering = DISABLE_CLUSTERING,
/* Make sure we dont get a sg segment crosses a page boundary */
.dma_boundary = PAGE_SIZE-1,
+ .no_write_same = 1,
};
enum {