From patchwork Thu Dec 21 17:34:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 10128141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C8A060318 for ; Thu, 21 Dec 2017 17:35:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B35E29CE3 for ; Thu, 21 Dec 2017 17:35:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6012E29D38; Thu, 21 Dec 2017 17:35:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0DCE29D37 for ; Thu, 21 Dec 2017 17:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755157AbdLURfp (ORCPT ); Thu, 21 Dec 2017 12:35:45 -0500 Received: from mail-co1nam03on0046.outbound.protection.outlook.com ([104.47.40.46]:36042 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754661AbdLURfA (ORCPT ); Thu, 21 Dec 2017 12:35:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FBQS3CuyubhsJKESN5OnY2Zhf2X7VPuKmXOm1cIicMs=; b=JN3u8D9ikSTeaNtXoBbmBhqAkM1akyfZ+Y+e12mMSvx6W3D1wol0Vj2g0Dw8NhNRccN1rQTb4YzqW0S0qJF6RrVXIBmPYHmkWtSkIdo7B0/kRayu3mJ8tasmLe6wF9URE30GCCuK9wKIOHhHfdkpn7jEQaJepLYkKg2SrDOgyyM= Received: from MWHPR02CA0042.namprd02.prod.outlook.com (10.164.133.31) by BY2PR0201MB0744.namprd02.prod.outlook.com (10.160.124.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 17:34:57 +0000 Received: from BN1BFFO11FD036.protection.gbl (2a01:111:f400:7c10::1:177) by MWHPR02CA0042.outlook.office365.com (2603:10b6:301:60::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Thu, 21 Dec 2017 17:34:57 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; linux.vnet.ibm.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.21 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.21; helo=avsrvexchhts1.microsemi.net; Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BN1BFFO11FD036.mail.protection.outlook.com (10.58.144.99) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.302.6 via Frontend Transport; Thu, 21 Dec 2017 17:34:42 +0000 Received: from localhost (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 21 Dec 2017 09:34:29 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" Subject: [PATCH 29/29] scsi: aacraid: Remove AAC_HIDE_DISK check in queue command Date: Thu, 21 Dec 2017 09:34:20 -0800 Message-ID: <20171221173420.8213-30-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.100.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(376002)(39380400002)(2980300002)(438002)(189003)(199004)(356003)(106002)(478600001)(76506005)(6666003)(2950100002)(36756003)(305945005)(8936002)(110136005)(5660300001)(16586007)(2201001)(316002)(50226002)(54906003)(77096006)(86362001)(57986006)(81166006)(81156014)(8676002)(47776003)(106466001)(48376002)(97736004)(50466002)(76176011)(4326008)(72206003)(59450400001)(68736007)(69596002)(51416003)(2906002)(1076002)(104016004)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB0744; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD036; 1:BaBt+iWsw8Dl+NNNiTS2GWbIC8qhJj/QfV+MIZ2I4Z5H9H2VjPMfVn4Uxn85qLG1i+HPgbOhGGZmr7lK0buH5+5KEvVLVq29chiaR8ek1b1Si7iQck4lzcKkcxJ0yv+v X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b12dc546-dc80-4a26-d7a4-08d548991ef0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:BY2PR0201MB0744; X-Microsoft-Exchange-Diagnostics: 1; BY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DiFqPJeL6d1jOQSmbpInNpHlpTKA76ZTFnf2Dq6I987KuWXh6UdHDwqQ39lqhW1fAyldK13NKOyHQSuEyPXfiKxpC3zRrKtSQIctR8mQbG0LXDsfeX5lk3ODiL1Io/K08sZe/SHTSfTyFGbySZg+vw8guKH+rFSI+2S873ox0V7u3vEJmiBspAEapxDwfd/6a6Jp7AlyuCyoWach8qz0E3MUDU7cMmbG98nYwmmxXNbsqlymjuR1eJnnxybm2fIbzjnU+u/v2OZddqafMtbbNI8bzXLeUShRMr1zgC3Qnph7NzzK5hZ0ZOL04POAIHt9Wwhoat3w3rxED7HoBwohjHGnFLD7zBRWfTka44uh5ggv8rMq/Tyoj6IfZx/bDkUZmt3ZefwxUv9Gk/0fEo7cSjlzdtWrUn+zf2QqkQFn7fz9JZ55TRVTBtXl9owInK5H0zAvi8cEy9JacIayMn+Gz+5eM6RsR662GdmO7zouaUhW/yrCP0065z8TV0Vkw2+ODDfgiEJj7/p96+w2gEcKFIs1ZrwdpP+FuHxcd/EUHNu0X9TTNclzux4ytXv7H4z/I8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3231023)(3002001)(6055026)(6041268)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:BY2PR0201MB0744; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0201MB0744; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0744; 4:PkM018ep43Tutz1lKpQ5xe+EwOiWRo0zjkVX/pMwSpzgBQu7t2rWotbGBDzwPqAKLUwr/OVt47FzG0yBtJNW+2GaFMFCxl29OlqM7PLRybAzlTZhePmSbE6CysylVeRNtialTdDH/JfaVn4b2LSjvkrG/V177eoP9/qnFJxd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yiP82KnJqSVU4dHDMvhm09NHOQFQ9k7HUBvPYeWMb9Byln8uSi+uLX20kmr7XYf94f4y4=; 24:cE+qvNDZ6lbqUDR+UVMYjUwU24dKs2jvrM0KpRrQz9qnCEqao2qiLEHElCEU6oqcE9uIDdWaV9ppFK8vK04GI7/g8exX1QKkwmkiWJmtlAw=; 7:+MOgaxhqV2V7OAhSnAFxxvmPq971eQtwXpWoc1hb6kIAT/WjSxIjr8jSAug7ACPKV3kzLuhTKGXvVZ1SDkZd9tIU5sTPEa/acXej03tvctu5aj76Be0LKruZ9bmVpz4krkpMbCAcOxWrTXbkEjMlLYwrXzGPAhn/BRd+fvj+uAkjOYPZTB1EUzdt99RKXL+wSQD3JGOh4ekQiNzzVjlT7VC9jHby3gKcCu4u+YLokcm7JM5PC+QCGioe/Xu9Vdlq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 17:34:42.5657 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b12dc546-dc80-4a26-d7a4-08d548991ef0 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.21]; Helo=[avsrvexchhts1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB0744 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Earlier driver would scan throgh all supported buses and targets and add devices that responded. It would add devices that were _hidden_ by the fw. Driver would invalidate commands sent to _hidden_ devices via the AAC_HIDE_DISK check. Since the driver now adds only the devices that are supposed to be exposed, this code can be removed. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aachba.c | 10 ---------- drivers/scsi/aacraid/aacraid.h | 3 --- 2 files changed, 13 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index aabbefd..43f9813 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -2005,8 +2005,6 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev) if (bus >= AAC_MAX_BUSES || target >= AAC_MAX_TARGETS) continue; - dev->hba_map[bus][target].expose = expose_flag; - if (expose_flag != 0) { devtype = AAC_DEVTYPE_RAID_MEMBER; goto update_devtype; @@ -2924,14 +2922,6 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) } } else { /* check for physical non-dasd devices */ bus = aac_logical_to_phys(scmd_channel(scsicmd)); - if (bus < AAC_MAX_BUSES && cid < AAC_MAX_TARGETS && - (dev->hba_map[bus][cid].expose - == AAC_HIDE_DISK)){ - if (scsicmd->cmnd[0] == INQUIRY) { - scsicmd->result = DID_NO_CONNECT << 16; - goto scsi_done_ret; - } - } if (bus < AAC_MAX_BUSES && cid < AAC_MAX_TARGETS && dev->hba_map[bus][cid].devtype diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 9804d3c..ff1f55f 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1339,8 +1339,6 @@ struct fib { #define AAC_DEVTYPE_RAID_MEMBER 1 #define AAC_DEVTYPE_ARC_RAW 2 #define AAC_DEVTYPE_NATIVE_RAW 3 -#define AAC_EXPOSE_DISK 0 -#define AAC_HIDE_DISK 3 #define AAC_SAFW_RESCAN_DELAY 10 @@ -1350,7 +1348,6 @@ struct aac_hba_map_info { u8 reset_state; /* 0 - no reset, 1..x - */ /* after xth TM LUN reset */ u16 qd_limit; - u8 expose; /*checks if to expose or not*/ u32 scan_counter; struct aac_ciss_identify_pd *safw_identify_resp; };