From patchwork Wed Dec 27 04:34:50 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: 10133423 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 C68F06037D for ; Wed, 27 Dec 2017 04:35:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF19F2DA63 for ; Wed, 27 Dec 2017 04:35:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3D072DAA2; Wed, 27 Dec 2017 04:35:42 +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 32AF82DA63 for ; Wed, 27 Dec 2017 04:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbdL0Efh (ORCPT ); Tue, 26 Dec 2017 23:35:37 -0500 Received: from mail-cys01nam02on0077.outbound.protection.outlook.com ([104.47.37.77]:27328 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751822AbdL0Ef3 (ORCPT ); Tue, 26 Dec 2017 23:35:29 -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=1E77c5l/xVQ7/lMQ+qMZmqryWJJdv0CxaClWfYtqU5I=; b=dyL6AbYT1Pxj16CNufzpcR0FrVDEuN9cvmijCFx2Dr0+eeCfsxl92aBz1yGet6NMPJqqB+AATFuouAoqEWvxDqgzPTIQ/G+IkQvDqO6IYHgl7/hnTUrm2YCcdkCZ8LCC/WeRZVxzFmLSlMDQwF7jyFwrv2tR5jONlpyZQ8bZD3k= Received: from MWHPR0201CA0048.namprd02.prod.outlook.com (10.167.160.25) by BY2PR0201MB1832.namprd02.prod.outlook.com (10.163.75.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Wed, 27 Dec 2017 04:35:26 +0000 Received: from BL2FFO11FD050.protection.gbl (2a01:111:f400:7c09::151) by MWHPR0201CA0048.outlook.office365.com (2603:10b6:301:73::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Wed, 27 Dec 2017 04:35:26 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; wdc.com; dkim=none (message not signed) header.d=none;wdc.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 BL2FFO11FD050.mail.protection.outlook.com (10.173.161.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.345.12 via Frontend Transport; Wed, 27 Dec 2017 04:35:06 +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; Tue, 26 Dec 2017 20:35:04 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" , Bart Van Assche Subject: [PATCH v2 29/30] scsi: aacraid: Remove AAC_HIDE_DISK check in queue command Date: Tue, 26 Dec 2017 20:34:50 -0800 Message-ID: <20171227043451.27813-30-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171227043451.27813-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171227043451.27813-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)(376002)(39380400002)(346002)(39860400002)(396003)(2980300002)(438002)(199004)(189003)(4326008)(2950100002)(36756003)(106466001)(5660300001)(50466002)(51416003)(53936002)(76176011)(2906002)(48376002)(8936002)(86362001)(50226002)(69596002)(356003)(305945005)(1076002)(57986006)(76506005)(104016004)(81156014)(81166006)(68736007)(8676002)(77096006)(478600001)(72206003)(47776003)(16586007)(106002)(59450400001)(54906003)(2201001)(97736004)(316002)(6666003)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1832; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD050; 1:wFOyAnTf0roMyT5xcukOz1YunfvwPiHR8OTgrdiVlIhS5ZdsrxKtG83GxX9Yow5uUhv+8I05/fjM0K7V2mYK6SD195OaaCuf44DLz1nRrWiD6VjzTPZx/EAElFk31tp3 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6812fe65-4f4e-4701-ad1b-08d54ce334be X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:BY2PR0201MB1832; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1832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avBHKZr3cq4TvOhaMt63IYaYpwweYUYJ7pNboT0FuXGIa1673hsLfuWmMTB+NbYAEzSoGty2txlzJI7qZEKUeL+nZmMBaWwwitRSvZI8JFE6cfraUA2ryHFW9gv0vHwTCQb9dWaLUBUQe+sgniVKYFcjXJZsUvvLL5rflNfd0TRJn7HnBK/ubwYxRa1zknU4RTUPaol2F7r3rm3AoHEJjasTXd/FsVyzIlEmw28/60EnMfubUYhukZ0hHiDx71N3Ug32bPd7lsgwnXjRCdARk0DKZS8Ru6emjkkwlskY+3USocXhbnn0CK0R2vLjQ8B6D1VoBxEfcM4zF1+OOc6aTi8NtN9qVcvh57ECMSQlv0EPSX+1hTyEYsLuepw9VDxAgCO4OqHhUth+AaAGH8Nv2KcF5qkhmMhsTFlgymWNT0xxWQzkG6TpbnVYs3Qz9T1ldpCXYXqGOwLn8g0RcHMZsaDhWS/mV9cI2Ga0rWtfM9J0OVGya5bSGimew3PR5QVm5JG/9TE54UDHRsXltJpXdM0++tDm9qGOaFqUMT8uzGg025qvhitSFMw= 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)(3002001)(93006095)(93004095)(3231023)(944501075)(6055026)(6041268)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BY2PR0201MB1832; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0201MB1832; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1832; 4:K7eftA6yc/vBJMnz04BD6I5PBTTUsn5OX+YJWiyACzlCH705hVnFPgTmKkrNlPAe90kk53X48AN06Seu2+S13ObjjLbBBX/w1kmVUj44WAOt8saYFmO7tfVWOBGHc+BxTDkJ+SZ6Bl18ZjCNOG4V/4h/CKHFwsHvbtzQgNGJDC0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RVE3PUZuJuH/duOvYGojPRg0nbcfSURSKhwsLpck=; 24:dSBPFaEMy87xeoTBAI3aU87/nd6HKYPed+6GjsqaHPvueQnNK376/QxKw3/zrM1Nij3WsDjnRMZd0RarUBDRF1k98yyQPWNQkfAzELK5/lM=; 7:Pf5aCgg3sl2M4G1maftTCUWBEbnZHQ0M6VAbySjuqWsoR32JaqkNiedSJzvCEOI1NOPMsilMOQBbHmnlXVB8pScgKOL/0pyytFNkAXLfhU7Dw9A/lPUHwk11MSE52cm6gZw5qU7SnDuZItibnD2ZDPf9+IopqDCLAzr7B2IPzy8KTpTrHy+kEnIpE2l3E2jv8hhy8ZI9HOEbyBDV0OIVsLRaIBZotX233h1LbcoLXDSKztFHjFsOB97xyemMR0Vg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 04:35:06.5715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6812fe65-4f4e-4701-ad1b-08d54ce334be 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: BY2PR0201MB1832 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 --- Changes in V2: None 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 f498bed..a2bdd79 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -1994,8 +1994,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; @@ -2913,14 +2911,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 3e8a44c..4d3536d 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; };