From patchwork Tue Feb 17 23:36:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viswas G X-Patchwork-Id: 9950961 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 749C56038F for ; Wed, 13 Sep 2017 10:42:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6651828F7A for ; Wed, 13 Sep 2017 10:42:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B02128FBC; Wed, 13 Sep 2017 10:42:10 +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=-3.5 required=2.0 tests=BAYES_00, DATE_IN_PAST_96_XX, 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 B980528F7A for ; Wed, 13 Sep 2017 10:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbdIMKmJ (ORCPT ); Wed, 13 Sep 2017 06:42:09 -0400 Received: from mail-bl2nam02hn0241.outbound.protection.outlook.com ([104.47.38.241]:40323 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751705AbdIMKmH (ORCPT ); Wed, 13 Sep 2017 06:42:07 -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=hLrkYc0tmH10Rp/Tfvaxgmsl5bX4F7FVKqGVqbeywyY=; b=A6Ee7oBZtQSCNRQ1Nujh7TzXfRxOh2OkERl0bu6bbq6yXynVdi/R77/ZVB2NOGU5+nDgU3n2Om515f9iIY+vZFrudn7agrEvn6I93O5EkwNhlZ9pDmoEqWSzeqwa+C3PxlkgIumhGc7t3wtav+jHXb9AQrCWpuaJwuUBqo3Wnek= Received: from CY4PR02CA0004.namprd02.prod.outlook.com (10.169.188.14) by BY2PR0201MB1494.namprd02.prod.outlook.com (10.163.153.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Wed, 13 Sep 2017 10:42:04 +0000 Received: from BN1AFFO11FD021.protection.gbl (2a01:111:f400:7c10::139) by CY4PR02CA0004.outlook.office365.com (2603:10b6:903:18::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Wed, 13 Sep 2017 10:42:04 +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 BN1AFFO11FD021.mail.protection.outlook.com (10.58.52.81) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.13.11 via Frontend Transport; Wed, 13 Sep 2017 10:42:03 +0000 Received: from localhost (10.187.72.81) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server id 14.3.361.1; Wed, 13 Sep 2017 03:42:01 -0700 From: Viswas G To: CC: , , , , , Subject: [PATCH V2 1/9] pm80xx : redefine sas_identify_frame structure Date: Wed, 18 Feb 2015 05:06:42 +0530 Message-ID: <20150217233650.9091-2-Viswas.G@microsemi.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20150217233650.9091-1-Viswas.G@microsemi.com> References: <20150217233650.9091-1-Viswas.G@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:SPM; SFS:(10009020)(6009001)(376002)(366002)(39860400002)(346002)(2980300002)(438002)(199003)(189002)(316002)(2950100002)(36756003)(53936002)(6666003)(69596002)(5660300001)(1076002)(97736004)(76176999)(50986999)(6916009)(47776003)(54906002)(4326008)(104016004)(77096006)(8676002)(2351001)(68736007)(305945005)(50466002)(356003)(86362001)(48376002)(110136004)(57986006)(76506005)(2906002)(5003940100001)(106466001)(478600001)(189998001)(81166006)(81156014)(8936002)(50226002)(5530500006); DIR:OUT; SFP:1501; SCL:5; SRVR:BY2PR0201MB1494; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD021; 1:Z/ZEK6BWx/sCCbf3nq8Dds7ouvpyFYIvN9eljLZ20eZUq5w3Gxhq0cEzxQlGXnbR3BCLUhwlQbbRnjBwjgzHDNjshd58Q0jeHiWUtM0McsyEtWdFZm2+Ahu3AaHo7vCF X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1530590-d4e3-4230-b6d4-08d4fa941261 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0201MB1494; X-Microsoft-Exchange-Diagn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3yIXLzEC4HL3tYXvT/zJ/utKxZPIiiSUZaAx5wcpcI/VFew1WA3m43KsFnWAN68pXPlrzFz+7CDMrHh6Su3tpwRdwr0WT2Eyol4I3NGKpLdT4oTTUt1HfMmkqA/ofZdHv3MIRhhf4PgUCvTez033aawcAaroMgRmV9QXGVXxRrS/AqrG3eQ5kfbMEGB3bzsLTFqSEHIiAmVFe85N9w9QnUvb4F3cfDzWZ7HhvrUyzpbL4tCms5ISjE3ZNidT70ARvWU+M1b18VkcbIgJwxoSrmQowkbUiscUk/mogm2X/OB09zk+NxIC4nqWSmNTEvWcfbIogpFCRr810B+tcW4+b9bv5r3sWdZR/MLCpgAw5GUZKBIfhwhtIMWIbKiptlyFNJlBg9yW+fl7+mVfS9LRAk2tvbzjwrNWjUl0g+nNl5V3vWQ5+S5tJoz4r93P4XZydoyOE1oug85pK6dMZurEZg/ADcoh2JVTSQl X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0201MB1494; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0201MB1494; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1494; 4:lHvMbaKk/acisfkSL15io+xZpjH6M8GfbuxYRgYvTS7R3uBfenLdxHzfkWMHaZvtcIJXKfXSOgej+tqkqP0KUU+poIl3P5u0r6326u0rC5kGiYAkR8a/TxpBIa9lQ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kFm/pClBtslgT4OiRw6Mi1pjz2D6n5NP3jHGUgDWayEaR260Hz/pWaJ2u5x1D5kx1xFqTu0mpQPDIn9qOd/pKyd3qHh/ZOoTZ3kuw==; 24:se0CxD/9R2D1RO40YRv6mczCZVg3rMNPC5hbLQoVFLTjjmD2jJUm8IRTbYgo2uxGfV5ycaEZkCvop+QgB/mNwA==; 7:2KY7S2S/b6dS0r/PaTcvr81QBt9EStb9wO5pDaby9pdBPtRloBgsbrMjIL8XkF4Okv1LzPvFt75M+t+oxp3ep9VpPmA8CtNn8HV73zAYIJnHNsh6JL0rOTA4pQB2VretbiPtdqoIPr6IkopOk984yvXD4tC0IT7C7Y9Sm4WiflIGUZrZwXDwktaFMP0YrMozOnErjp1ji8Umu+2GSLXVqf+BONJ4UqFku+YIYVN/7YE= SpamDiagnosticOutput: 1:22 X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2017 10:42:03.2836 (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: BY2PR0201MB1494 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 sas_identify structure defined by pm80xx doesn't have CRC field. So added a new sas_identify structure without CRC. v2: - Since the structure changes is applicable for only pm80xx, sas_identify_frame_local structure moved to pm80xx_hwi.h. Signed-off-by: Raj Dinesh Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm80xx_hwi.h | 98 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h index 7a443bad6163..82b8cf581da9 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.h +++ b/drivers/scsi/pm8001/pm80xx_hwi.h @@ -229,6 +229,102 @@ #define IT_NEXUS_TIMEOUT 0x7D0 #define PORT_RECOVERY_TIMEOUT ((IT_NEXUS_TIMEOUT/100) + 30) +#ifdef __LITTLE_ENDIAN_BITFIELD +struct sas_identify_frame_local { + /* Byte 0 */ + u8 frame_type:4; + u8 dev_type:3; + u8 _un0:1; + + /* Byte 1 */ + u8 _un1; + + /* Byte 2 */ + union { + struct { + u8 _un20:1; + u8 smp_iport:1; + u8 stp_iport:1; + u8 ssp_iport:1; + u8 _un247:4; + }; + u8 initiator_bits; + }; + + /* Byte 3 */ + union { + struct { + u8 _un30:1; + u8 smp_tport:1; + u8 stp_tport:1; + u8 ssp_tport:1; + u8 _un347:4; + }; + u8 target_bits; + }; + + /* Byte 4 - 11 */ + u8 _un4_11[8]; + + /* Byte 12 - 19 */ + u8 sas_addr[SAS_ADDR_SIZE]; + + /* Byte 20 */ + u8 phy_id; + + u8 _un21_27[7]; + +} __packed; + +#elif defined(__BIG_ENDIAN_BITFIELD) +struct sas_identify_frame_local { + /* Byte 0 */ + u8 _un0:1; + u8 dev_type:3; + u8 frame_type:4; + + /* Byte 1 */ + u8 _un1; + + /* Byte 2 */ + union { + struct { + u8 _un247:4; + u8 ssp_iport:1; + u8 stp_iport:1; + u8 smp_iport:1; + u8 _un20:1; + }; + u8 initiator_bits; + }; + + /* Byte 3 */ + union { + struct { + u8 _un347:4; + u8 ssp_tport:1; + u8 stp_tport:1; + u8 smp_tport:1; + u8 _un30:1; + }; + u8 target_bits; + }; + + /* Byte 4 - 11 */ + u8 _un4_11[8]; + + /* Byte 12 - 19 */ + u8 sas_addr[SAS_ADDR_SIZE]; + + /* Byte 20 */ + u8 phy_id; + + u8 _un21_27[7]; +} __packed; +#else +#error "Bitfield order not defined!" +#endif + struct mpi_msg_hdr { __le32 header; /* Bits [11:0] - Message operation code */ /* Bits [15:12] - Message Category */ @@ -248,7 +344,7 @@ struct mpi_msg_hdr { struct phy_start_req { __le32 tag; __le32 ase_sh_lm_slr_phyid; - struct sas_identify_frame sas_identify; /* 28 Bytes */ + struct sas_identify_frame_local sas_identify; /* 28 Bytes */ __le32 spasti; u32 reserved[21]; } __attribute__((packed, aligned(4)));