1 From 30f359a6f9da65a66de8cadf959f0f4a0d498bba Mon Sep 17 00:00:00 2001
2 From: Nicholas Bellinger <nab@linux-iscsi.org>
3 Date: Wed, 10 Apr 2013 15:00:27 -0700
4 Subject: target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
6 From: Nicholas Bellinger <nab@linux-iscsi.org>
8 commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream.
10 This patch fixes a bug where a handful of informational / control CDBs
11 that should be allowed during ALUA access state Standby/Offline/Transition
12 where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.
14 This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
15 registration when LUN scanning occured during these ALUA access states.
17 Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
18 Cc: Hannes Reinecke <hare@suse.de>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 drivers/target/target_core_alua.c | 3 +++
23 1 file changed, 3 insertions(+)
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
29 case RECEIVE_DIAGNOSTIC:
33 switch (cdb[1] & 0x1f) {
34 case MI_REPORT_TARGET_PGS:
35 @@ -450,6 +451,7 @@ static inline int core_alua_state_unavai
41 switch (cdb[1] & 0x1f) {
42 case MI_REPORT_TARGET_PGS:
43 @@ -490,6 +492,7 @@ static inline int core_alua_state_transi
49 switch (cdb[1] & 0x1f) {
50 case MI_REPORT_TARGET_PGS: