From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130507035849.140791177@goodmis.org> Date: Mon, 06 May 2013 23:58:01 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hannes Reinecke , Nicholas Bellinger Subject: [049/126] target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs References: <20130507035712.909872333@goodmis.org> Content-Disposition: inline; filename=0049-target-Fix-incorrect-fallthrough-of-ALUA-Standby-Off.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.3 stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Bellinger [ Upstream commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba ] This patch fixes a bug where a handful of informational / control CDBs that should be allowed during ALUA access state Standby/Offline/Transition where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*. This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN registration when LUN scanning occured during these ALUA access states. Cc: Hannes Reinecke Cc: Signed-off-by: Nicholas Bellinger Signed-off-by: Steven Rostedt --- drivers/target/target_core_alua.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 41641ba..61077ce 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -420,6 +420,7 @@ static inline int core_alua_state_standby( case REPORT_LUNS: case RECEIVE_DIAGNOSTIC: case SEND_DIAGNOSTIC: + return 0; case MAINTENANCE_IN: switch (cdb[1] & 0x1f) { case MI_REPORT_TARGET_PGS: @@ -462,6 +463,7 @@ static inline int core_alua_state_unavailable( switch (cdb[0]) { case INQUIRY: case REPORT_LUNS: + return 0; case MAINTENANCE_IN: switch (cdb[1] & 0x1f) { case MI_REPORT_TARGET_PGS: @@ -502,6 +504,7 @@ static inline int core_alua_state_transition( switch (cdb[0]) { case INQUIRY: case REPORT_LUNS: + return 0; case MAINTENANCE_IN: switch (cdb[1] & 0x1f) { case MI_REPORT_TARGET_PGS: -- 1.7.10.4