]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.8.8/target-fix-incorrect-fallthrough-of-alua-standby-offline-transition-cdbs.patch
Linux 3.8.8
[thirdparty/kernel/stable-queue.git] / releases / 3.8.8 / target-fix-incorrect-fallthrough-of-alua-standby-offline-transition-cdbs.patch
CommitLineData
9889d8f6
GKH
1From 30f359a6f9da65a66de8cadf959f0f4a0d498bba Mon Sep 17 00:00:00 2001
2From: Nicholas Bellinger <nab@linux-iscsi.org>
3Date: Wed, 10 Apr 2013 15:00:27 -0700
4Subject: target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
5
6From: Nicholas Bellinger <nab@linux-iscsi.org>
7
8commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream.
9
10This patch fixes a bug where a handful of informational / control CDBs
11that should be allowed during ALUA access state Standby/Offline/Transition
12where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.
13
14This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
15registration when LUN scanning occured during these ALUA access states.
16
17Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
18Cc: Hannes Reinecke <hare@suse.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/target/target_core_alua.c | 3 +++
23 1 file changed, 3 insertions(+)
24
25--- a/drivers/target/target_core_alua.c
26+++ b/drivers/target/target_core_alua.c
27@@ -408,6 +408,7 @@ static inline int core_alua_state_standb
28 case REPORT_LUNS:
29 case RECEIVE_DIAGNOSTIC:
30 case SEND_DIAGNOSTIC:
31+ return 0;
32 case MAINTENANCE_IN:
33 switch (cdb[1] & 0x1f) {
34 case MI_REPORT_TARGET_PGS:
35@@ -450,6 +451,7 @@ static inline int core_alua_state_unavai
36 switch (cdb[0]) {
37 case INQUIRY:
38 case REPORT_LUNS:
39+ return 0;
40 case MAINTENANCE_IN:
41 switch (cdb[1] & 0x1f) {
42 case MI_REPORT_TARGET_PGS:
43@@ -490,6 +492,7 @@ static inline int core_alua_state_transi
44 switch (cdb[0]) {
45 case INQUIRY:
46 case REPORT_LUNS:
47+ return 0;
48 case MAINTENANCE_IN:
49 switch (cdb[1] & 0x1f) {
50 case MI_REPORT_TARGET_PGS: