From patchwork Thu Jun 18 09:43:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6634751 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C7E689F1C1 for ; Thu, 18 Jun 2015 09:44:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09B032075A for ; Thu, 18 Jun 2015 09:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A5432081C for ; Thu, 18 Jun 2015 09:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754547AbbFRJn7 (ORCPT ); Thu, 18 Jun 2015 05:43:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54797 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754524AbbFRJnv (ORCPT ); Thu, 18 Jun 2015 05:43:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0F736ADDE; Thu, 18 Jun 2015 09:43:44 +0000 (UTC) From: Hannes Reinecke To: Nic Bellinger Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org, Christoph Hellwig , Ewan Milne , Hannes Reinecke Subject: [PATCH 7/8] target_core_alua: disallow READ_CAPACITY when in standby Date: Thu, 18 Jun 2015 11:43:41 +0200 Message-Id: <1434620622-65391-8-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1434620622-65391-1-git-send-email-hare@suse.de> References: <1434620622-65391-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Strictly speaking SPC doesn't require READ CAPACITY and friends to be supported while in the port is in standby. Signed-off-by: Hannes Reinecke --- drivers/target/target_core_alua.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index edaf1b9..a62e58b 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -561,16 +561,7 @@ static inline int core_alua_state_standby( case REPORT_LUNS: case RECEIVE_DIAGNOSTIC: case SEND_DIAGNOSTIC: - case READ_CAPACITY: return 0; - case SERVICE_ACTION_IN_16: - switch (cdb[1] & 0x1f) { - case SAI_READ_CAPACITY_16: - return 0; - default: - set_ascq(cmd, ASCQ_04H_ALUA_TG_PT_STANDBY); - return 1; - } case MAINTENANCE_IN: switch (cdb[1] & 0x1f) { case MI_REPORT_TARGET_PGS: