From patchwork Thu Jul 20 09:44:27 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: 9853333 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 CC30D60388 for ; Wed, 19 Jul 2017 23:27:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6A0D28715 for ; Wed, 19 Jul 2017 23:27:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8B8528717; Wed, 19 Jul 2017 23:27:58 +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=-5.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, 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 70E5928715 for ; Wed, 19 Jul 2017 23:27:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932419AbdGSX14 (ORCPT ); Wed, 19 Jul 2017 19:27:56 -0400 Received: from mail-sn1nam01on0049.outbound.protection.outlook.com ([104.47.32.49]:48283 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932320AbdGSX1y (ORCPT ); Wed, 19 Jul 2017 19:27:54 -0400 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=XewxEddybFu4nUlbjgYWMeAqnm/0QkFcTOq52XfADxo=; b=SJ/Fe85DfhwcgWj6Og+yR+iNqMMNiS+sTF1Z8NQm4OT5D9GcZsBFNH7lApztwW1Ze6SuVphSpmlklNnvF4N+Zj2C4uKKvCN2l6FKOeX2PALVXtiI4WMJo0otP9lEaN4qElNpyO0BrDpbB6e/oW5lQCYQFW2nG/ANYQSoqkrVCjk= Received: from BY2PR02CA0088.namprd02.prod.outlook.com (10.242.32.46) by BY1PR02MB1211.namprd02.prod.outlook.com (10.162.108.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 19 Jul 2017 23:27:52 +0000 Received: from BY2FFO11FD032.protection.gbl (2a01:111:f400:7c0c::111) by BY2PR02CA0088.outlook.office365.com (2a01:111:e400:2c2a::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13 via Frontend Transport; Wed, 19 Jul 2017 23:27:52 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.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 BY2FFO11FD032.mail.protection.outlook.com (10.1.14.210) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1240.9 via Frontend Transport; Wed, 19 Jul 2017 23:27:52 +0000 Received: from rslab209.pmc-sierra.bc.ca (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server id 14.3.351.0; Wed, 19 Jul 2017 16:27:51 -0700 Subject: [PATCH] scsi: Add helper functions to set target ID From: Raghava Aditya Renukunta To: , , CC: , Date: Thu, 20 Jul 2017 02:44:27 -0700 Message-ID: <150054386781.12890.7252889519285948439.stgit@rslab209.pmc-sierra.bc.ca> User-Agent: StGit/0.17.1-dirty 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)(6009001)(39400400002)(39860400002)(39410400002)(39850400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(103116003)(50986999)(53936002)(54356999)(77096006)(47776003)(54906002)(189998001)(9686003)(55016002)(83506001)(8936002)(81166006)(305945005)(8676002)(356003)(72206003)(7696004)(38730400002)(2201001)(86362001)(4001350100001)(478600001)(6666003)(2906002)(4326008)(626005)(5660300001)(104016004)(230700001)(106466001)(50466002)(53416004)(23676002)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR02MB1211; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD032; 1:oC6XuLLh3a/boeC+rOPUaxRuRzACmOkBCCOKot/s1KYc1TG7lxgoWhVZxV0psR5XOVxsWweo1bQlWSs8eakHBcgY/spRppbI0eP7kGfszDXlduR68E2EJEH4MwMxO8XFaAlny4ZivrsXrGAA51N7ZOn+dIR2b9o+BhpExboDVGENWQBY8Caya7YhSAIyylgqjASkhA5wcyDw9RFHiu/+r8iVNrwCTwYICPQTdxlnBzoRQjrHGzsOIf4By/y4zmfM2DcqSec4X7z7dqNX5zmb9obhODHJ2Og4v7s5WbGHLgrbB7tnJuJ08+a44VAqLuPtXMK4xFr3JQmCqFIAdEkCSw/NM6+aMys8Zs2D1/H2nIo+63fjq64v6QIM4ewjUMAB7k123dtFOiDwOnASusBfcGL4T63fW4QS5vhQPNn4TjMc1bZCrmYo1CJPz/EjZzSgXtePmEgxOXCxFdSahBIuZ8OUEjWdTllpD4rSJMru1sM31i6zp/JAgrcy1lZqrcxJlV4GVlzAxAnuCGATRWS9Ayy3Bcq8pbYAMjkhVou9Za+FrwU2dP7J5yJlVG8eZkdzNMFBN/wR6oJa9xq2O401+hcxeLZRabhlplhhLnM1+NpuMakYXzimZndftytttQ4sezKZUQa3WtZfA4mVw+2xG2xrFM5CaxXsVtyunPtWpwwWgM6cbqupKHWTVMpqFchgOvQK8ets4CoxrKc9FREK5AuwQl+6YYZi3ynbr37seOZCOkJ2xS9b9/XkzZAtI6qtmn4kyDNAnZk9euE/tejvrqErjozXBAahP4fCkcMSA0ezIcLykrG0mpUqVUPmqZTrfEDL8BO/8ImB+5cKyaqBxHKVCXLRoXxs1cDrX3ksKdrIqhxxfzgpWF1N9MZlkLgv X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 155db7eb-5212-4c42-0d56-08d4cefdc6ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(8251501002)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY1PR02MB1211; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1211; 3:R5XsDd2l0Me+0b676GfIDOObdngx7xaxNrsFc4mGlSW10gsAhV8kdnX9DDAbMXEotSdB4p5KMSFkMadYtlTWXCmGWeT54AxIVNHtBNXlVy1eUYgNVfJWMQplxur3If4LBRQr40sHlWw5rQ4W1QELr8w0IZUw0FuYrcGXioK4MfLuSLvWDVBmQM0jFIlgL/ZuyGgt5/TDvWvJu1CSfCJeuf5b2MvsUHOFWuTVlk/WFUeRXrCjAMa0Fx+ZeowptceOpWlxj5RvtHCLepL6pUdvhOs9PFcJIMqo7+ZWQxdByfCOXKQvq6zyD8iTszYjz/BMM0xmZ/zrIqa3ygOu1/mJAQZ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WesM+tCLJXOE/oF4lPNC/q27XzqIy+51leeyPKoAqNM5A506Mfmw/hdE4AgndlshQpKUtvK4a72s20MRmQFvqQ8MT9z15JtlT/kXczg9HzklHLPQ0w7452q60+1jQFFyekZ88lIbgrPKW6sBdjA6+OLQTQvqYv2xDcoVw19xi7MiEpfYvbXcITJTXLKUNTYP23oMxQ== X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1211; 20:h/oBiDRM0q0srWQirkWEUPBuujoToRMoxUSJ7ofU8e8+cw/tYshsHkJgWvUF8lAjJqRZe9e09k2zadbT534nM8Hj/P8OQeTHyg2URye+T9EE7JyKmv60s3bmnr034cJ8O2YX6/giAdkIlbWEO/GvU9aU28p2gtfwl48mhqX6d94upLeNW8K2nI1z90yz8CBeBAwqTbrwWbDdbGttFMVvcSHoaimHt32oYSF5nKY5QAiEsg47YyXwG8wm9f91DLlRgsMQXhadHMM621ZmpP1yTr51UovbdSCFBLSeGUqYOlda1qtxPelT//keFMDVnc8TY+migtfGKKuc2aIC9wd05dBtwAv20EHllV7zhIwgE6Sb52ZmLf3oHaEcHN2pgVjVzJYObF8N+3r3TjJpeOrVTroI3C9Ir2eoB0s+aJ36zyXmtMVGon6pVxbHJoba/dHGwgGL3pi1ovA/7bKdAxI+43eN5+0fb7ZDbXH+M5aFnd5tflSFlLQf5lJb/PXJecj0 X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(72170198267865)(247924648384137); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(13018025)(13016025)(8121501046)(5005006)(3002001)(93006095)(93004095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR02MB1211; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR02MB1211; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTFQUjAyTUIxMjExOzQ6UkVhUEc2cFZDenVkTUdBdTN2OTJtYW1rM3Zw?= =?utf-8?B?U1NzMUhRRkVHSGNlNzE2dkYrMTFwcHhjOVlORWptTUVHYmx3MWJxa1ZWMkxV?= =?utf-8?B?eFJHMG9FOWlLdWtXS0tyK25ranQ4dkt0b0I5NzBPQnVGRm9xK2s2Y2JYMXBw?= =?utf-8?B?MXZ4QWJxbUQ0YXc2RVI1djlNV3B4MFJrNC84L2FickpTMjBKWldqNXhrcWd3?= =?utf-8?B?bi8xYXNlSnhOU0ZIQlJzZkR0TGpyaDR1MFhPendYOUNPUXFSQzdHR0JRdmdN?= =?utf-8?B?T1ArekdDMTlaMWowRm5PU0V4TGQ4QnFORGE2Q1prRHVRakRPQ1BKZTM3SHJ0?= =?utf-8?B?UEVnOFFlVER3TFNEMVZiWVI4T3doU3gyME5WTmwwRExVVnN0UzhPOHg4YmNT?= =?utf-8?B?UXh1cWwrMjRvTmRVa2NvaXdpcXRMeWN4SGtQZFJ0QkxQSGJKc1VBazNKUW55?= =?utf-8?B?QUNIZlREYWxlKzJFbVpUbTZFSkh0c05rd0FQNEIwbUZabnc1TGpIK3d3Nmpm?= =?utf-8?B?ODhUUS83OEVNZFdWWVhYTXlCQ2tOL2htdjNVZTI3US9MdVBxMlBEeTFwYXFt?= =?utf-8?B?U3BscHBRTG8weEcrWlI2NzFvM3I1NVRLUmFpeG9RVUVyd3Z5SDZSN2haL0Vj?= =?utf-8?B?U2FrU1pEVWNjR1RXanJUYXlsWEc2elQ0Q3kvbUJrQXpVWVpveTZVbkQvbWtD?= =?utf-8?B?NmlJQ3E3V3ZyWnhrczVzQ1RsZFp6TEhGV0puSEN3TnBBT2t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4/+QdDpuLNeHrdZIoS7R3qnNZFLPwHO2cZ/XOIU4tX5IDhSYoaeaLUA+YnVw+vFluRJuIHzO1E21Ix75dXti0yy8/fJqqTXbbm7aD1TUa90hTyLTK5nRAnJs0zh45Xtq8aBd3fJzqLiJFWPnKHVytBr4BOvEbTsiDC+raDWzHEMhNE6mc/Br0M0tttm44= X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2017 23:27:52.1182 (UTC) 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: BY1PR02MB1211 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 This patch adds 3 helper functions to set the initial target id, expander id and port id numbers. The ARC/HBA1000 product line exposes RAID drives on bus number 0 and sas transport HBA drives use bus 0 as well. We wanted to differentiate between the RAID and HBA targets when the adapter in mixed mode (both RAID and HBA are exposed). Since the number of RAID drives we support is limited to 64 we wanted to block the first 64 targets and then add the sas enabled HBA drives from target id 64. Unfortunately the current sas transport implementation does not allow changing of the next_target_id value (used by rphy to add drives), since it is not exposed directly to the driver. One way around this is to add helper functions to explicitly set the next_target_id and others. I still have to submit the sas transport aacraid support patches, but I wanted to send this out to get comments and any other changes if required. Signed-off-by: Raghava Aditya Renukunta --- 0 files changed diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 5006a656e16a..a6ef5520cb66 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -294,6 +294,31 @@ static void sas_bsg_remove(struct Scsi_Host *shost, struct sas_rphy *rphy) bsg_unregister_queue(q); } +void sas_set_initial_target_id(struct Scsi_Host *shost, u32 target_id) +{ + struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); + + sas_host->next_target_id = target_id; +} +EXPORT_SYMBOL(sas_set_initial_target_id); + +void sas_set_initial_expander_id(struct Scsi_Host *shost, u32 expander_id) +{ + struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); + + sas_host->next_expander_id = expander_id; +} +EXPORT_SYMBOL(sas_set_initial_expander_id); + +void sas_set_initial_port_id(struct Scsi_Host *shost, u32 port_id) +{ + struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); + + sas_host->next_port_id = port_id; +} +EXPORT_SYMBOL(sas_set_initial_port_id); + + /* * SAS host attributes */ diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 73d870918939..6917eee7bc24 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -179,6 +179,9 @@ struct sas_function_template { int (*smp_handler)(struct Scsi_Host *, struct sas_rphy *, struct request *); }; +void sas_set_initial_target_id(struct Scsi_Host *shost, u32 target_id); +void sas_set_initial_expander_id(struct Scsi_Host *shost, u32 expander_id); +void sas_set_initial_port_id(struct Scsi_Host *shost, u32 port_id); void sas_remove_children(struct device *); extern void sas_remove_host(struct Scsi_Host *);