]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Apr 2012 06:00:18 +0000 (23:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Apr 2012 06:00:18 +0000 (23:00 -0700)
added patches:
target-fix-unsupported-write_same-sense-payload.patch

queue-3.2/series
queue-3.2/target-fix-unsupported-write_same-sense-payload.patch [new file with mode: 0644]

index 8e50a17ff27a616bead950f63b7c079ecc1379af..87650380f48be225350a7f055f87982e0efb8991 100644 (file)
@@ -29,3 +29,4 @@ drm-i915-sanitize-bios-debugging-bits-from-pipeconf.patch
 drm-i915-add-lock-on-drm_helper_resume_force_mode.patch
 drm-i915-quirk-away-broken-opregion-vbt.patch
 r8169-runtime-resume-before-shutdown.patch
+target-fix-unsupported-write_same-sense-payload.patch
diff --git a/queue-3.2/target-fix-unsupported-write_same-sense-payload.patch b/queue-3.2/target-fix-unsupported-write_same-sense-payload.patch
new file mode 100644 (file)
index 0000000..21b8a49
--- /dev/null
@@ -0,0 +1,52 @@
+From 67236c44741e250199ccd77f1115568e68cf8848 Mon Sep 17 00:00:00 2001
+From: Martin Svec <martin.svec@zoner.cz>
+Date: Mon, 6 Feb 2012 22:13:25 -0800
+Subject: target: Fix unsupported WRITE_SAME sense payload
+
+From: Martin Svec <martin.svec@zoner.cz>
+
+commit 67236c44741e250199ccd77f1115568e68cf8848 upstream.
+
+This patch fixes a bug in target-core where unsupported WRITE_SAME ops
+from a target_check_write_same_discard() failure was incorrectly
+returning CHECK_CONDITION w/ TCM_INVALID_CDB_FIELD sense data.
+This was causing some clients to not properly fall back, so go ahead
+and use the correct TCM_UNSUPPORTED_SCSI_OPCODE sense for this case.
+
+Reported-by: Martin Svec <martin.svec@zoner.cz>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/target/target_core_transport.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/target/target_core_transport.c
++++ b/drivers/target/target_core_transport.c
+@@ -2666,7 +2666,7 @@ static int transport_generic_cmd_sequenc
+                       cmd->se_cmd_flags |= SCF_SCSI_CONTROL_SG_IO_CDB;
+                       if (target_check_write_same_discard(&cdb[10], dev) < 0)
+-                              goto out_invalid_cdb_field;
++                              goto out_unsupported_cdb;
+                       if (!passthrough)
+                               cmd->execute_task = target_emulate_write_same;
+                       break;
+@@ -2949,7 +2949,7 @@ static int transport_generic_cmd_sequenc
+               cmd->se_cmd_flags |= SCF_SCSI_CONTROL_SG_IO_CDB;
+               if (target_check_write_same_discard(&cdb[1], dev) < 0)
+-                      goto out_invalid_cdb_field;
++                      goto out_unsupported_cdb;
+               if (!passthrough)
+                       cmd->execute_task = target_emulate_write_same;
+               break;
+@@ -2972,7 +2972,7 @@ static int transport_generic_cmd_sequenc
+                * of byte 1 bit 3 UNMAP instead of original reserved field
+                */
+               if (target_check_write_same_discard(&cdb[1], dev) < 0)
+-                      goto out_invalid_cdb_field;
++                      goto out_unsupported_cdb;
+               if (!passthrough)
+                       cmd->execute_task = target_emulate_write_same;
+               break;