aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2013-10-23 06:25:40 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-11-28 23:48:39 -0500
commit54b2b50c20a61b51199bedb6e5d2f8ec2568fb43 (patch)
tree8bff3a0f9bc3a5577cb4191ee8043aa98d081b87 /include/scsi
parentae5fbae0ccd982dfca0ce363036ed92f5b13f150 (diff)
[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 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 546084964d55..fe3b58e836c8 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -475,6 +475,9 @@ struct scsi_host_template {
475 */ 475 */
476 unsigned ordered_tag:1; 476 unsigned ordered_tag:1;
477 477
478 /* True if the controller does not support WRITE SAME */
479 unsigned no_write_same:1;
480
478 /* 481 /*
479 * Countdown for host blocking with no commands outstanding. 482 * Countdown for host blocking with no commands outstanding.
480 */ 483 */
@@ -677,6 +680,9 @@ struct Scsi_Host {
677 /* Don't resume host in EH */ 680 /* Don't resume host in EH */
678 unsigned eh_noresume:1; 681 unsigned eh_noresume:1;
679 682
683 /* The controller does not support WRITE SAME */
684 unsigned no_write_same:1;
685
680 /* 686 /*
681 * Optional work queue to be utilized by the transport 687 * Optional work queue to be utilized by the transport
682 */ 688 */