From patchwork Fri Jan 30 06:06:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viswas G X-Patchwork-Id: 9922531 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 41150600C5 for ; Fri, 25 Aug 2017 17:12:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2986A28414 for ; Fri, 25 Aug 2017 17:12:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E46B2841C; Fri, 25 Aug 2017 17:12:04 +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 2AA9628414 for ; Fri, 25 Aug 2017 17:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755798AbdHYRMB (ORCPT ); Fri, 25 Aug 2017 13:12:01 -0400 Received: from mail-co1nam03hn0222.outbound.protection.outlook.com ([104.47.40.222]:15264 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755771AbdHYRMA (ORCPT ); Fri, 25 Aug 2017 13:12:00 -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=JBBfPKNOF9irdoVAQI6dT6qaVIni7BqwM6+qKScU8Iw=; b=FSgGbkolIj6GUiFmVxa/dnXttzrnnpjhY9gMzT2eqGnRfA9d/dxai9zAxzrP6tmFE6ZqpazAXevH3I+HvC0E4mcQyGdhdxhoomkLeRQBLdW/PeY6y9FkL6uM6CUrO9HRSCnIVcdH6HfelB7sB8QRdRoLXGuvrqXWvoG8M0IP00M= Received: from BLUPR0201CA0015.namprd02.prod.outlook.com (10.163.116.25) by SN1PR0201MB1455.namprd02.prod.outlook.com (10.163.129.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Fri, 25 Aug 2017 17:11:58 +0000 Received: from BY2FFO11OLC014.protection.gbl (2a01:111:f400:7c0c::108) by BLUPR0201CA0015.outlook.office365.com (2a01:111:e400:52e7::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9 via Frontend Transport; Fri, 25 Aug 2017 17:11:58 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.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 BY2FFO11OLC014.mail.protection.outlook.com (10.1.15.48) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1341.15 via Frontend Transport; Fri, 25 Aug 2017 17:11:58 +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; Fri, 25 Aug 2017 10:11:47 -0700 From: Viswas G To: CC: , , Subject: [PATCH 1/6] pm80xx : redefine sas_identify_frame structure Date: Fri, 30 Jan 2015 11:36:40 +0530 Message-ID: <20150130060645.23653-2-Viswas.G@microsemi.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20150130060645.23653-1-Viswas.G@microsemi.com> References: <20150130060645.23653-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)(39860400002)(2980300002)(438002)(199003)(189002)(97736004)(305945005)(356003)(110136004)(104016004)(107886003)(48376002)(50466002)(39060400002)(53936002)(76176999)(575784001)(86362001)(478600001)(54906002)(1076002)(36756003)(50986999)(76506005)(6916009)(2950100002)(4326008)(57986006)(5660300001)(68736007)(2906002)(189998001)(6666003)(77096006)(8936002)(47776003)(50226002)(8676002)(81156014)(81166006)(626005)(69596002)(106466001)(5003940100001)(2351001)(5530500006); DIR:OUT; SFP:1501; SCL:5; SRVR:SN1PR0201MB1455; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC014; 1:oJxbooJHomQLlA5CzKWLDy1KDo8cAaSzSKi7lLGx/cjmWJUAMvoU/M5/LSXPDKemO0d0Zwm10jksbsulXtDIg3nXhgNA85HsF6WikQ7S2Zjmpc6pdIEQwCFOGdeoCqwk X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95c7f388-8c8f-43af-2222-08d4ebdc64e2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0201MB1455; X-Microsoft-Exchange-Di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N1JCM6FTvQMjGtrh2/kYFfo+61xyu2YcOCYSe9fSLr1j4C3vMz64esWlVnqNHjH77RgQLqInr3zhsmBcZajLGPganxyCiuWM20JdTcjka44hckUii3j5RnNMMGsqIVkX/t7YUa1WycjCkTGvqutjYW4TDXxAF/LPlxb0YtS9wS4E4LeLSeplysZcIqbDmXH6p3fShFU1/O929LBbDu/hckC8PU16ugLC8GhoYnxjXzBFjuQNvsipeIcskyKQ3wa8viI0TvBHJbU+bzx+f1WbgBmLlM1yTPT8iOx1uF62AXNtBJln661BL4s84ceNmqFVz0sctiwPitWRVo6cZnsNtf4LdGi6ZSCmk67U71PQQGc4Ps2ZThyLSSyYmy7FHJw9WTgdZhX8VTfEzF+3pRSDvdRD12L6rDqDTYRymJ1WK+lIQJUIo3IonLszxgItWmQ+JrzJXqzCu2JgCwSbUCnmBHZTTb1N 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)(601004)(2401047)(5005006)(13018025)(8121501046)(13016025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93004095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0201MB1455; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0201MB1455; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1455; 4:EZadA042HV/nju6HCH/m+B2AqQNOw6RuQEVE3s9a0nwwyyCDgvXSD7sF4JhEbssdXhF3lqBPWg5A8aZjQfl6Vh5K/DJ9MQFDwnfrc9fJgXNDrAeYwvgMdZTVWpJsfV1lVWdsGk5P7Sz4f0K5yCsXkRaXdtQMjnSVKYaaY9URFB3K+Jux5A81OlWivlybMzD6WedfIhulzhJMTifSJf1KaIjsD90H1Xzvea3MbORafVR5EoBDSM4WiuXDAndGPSX09okmXmRIG73LFjcdTujWdfFNIriPHm0bzo4/E+5jiaY= X-Forefront-PRVS: 041032FF37 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0201MB1455; 23:7rtEGqxey4NeiI4hiuXScVdwYJDZWAgT0TB8dIG?= =?us-ascii?Q?uxL7G1kjhxMg3dPVNtsOv+dAvSNkAkvZXiVd97nw/5koML8o7SrzcYY0/0N2?= =?us-ascii?Q?wZPh+mKimesFZ2btaTKu5+A+2975zkALVqQbL745m2CMrJYhdyujcxbLvaOz?= =?us-ascii?Q?oXHMGZYhb8FRKzLBBqfsExKoSuVN93Oh9hTHj/q4ez3WwEyv9H3rEGLNMakU?= =?us-ascii?Q?9HsoYe4Hj3aQRkN43k31My6FxBnMxGBcdvbyK5umkCg2NkrK3GhDktjmHM5l?= =?us-ascii?Q?G9Cid+5HHDOyJI8iKxvQ+p2z82uZtkXUDw4TxE/CTwKGtZYJJwZ00dUOeehV?= =?us-ascii?Q?JdhdtQHBq9CY5JY4ny93qNDnc17ANsRGMxFhWPppWeCWsXdmZ/eF+ENlkBCp?= =?us-ascii?Q?yG+NK74TNyNJnEFvHpweMtqdaUmfLB4qQ0aEMQCfgdw5yGk3UJPZLbuw78b3?= =?us-ascii?Q?Nus3C2TPuZ/mg6C/Ky7Vg2m+l0eV/4DdJdXYG7+A1oT3xR4NO+bl3/3DosSp?= =?us-ascii?Q?H0RxFichL5MH1q3yKQeTrqh8Iu5UWB9waXfVHq5r0/VmQteieqgq7CpdiF2m?= =?us-ascii?Q?yDURhGYjroU7RRD2H5A3d+WJ5Qy9AEnDD0OvkRPPilwJeDWirYs0jdKBRIPG?= =?us-ascii?Q?YRPAqWPIJN0r6qF7lDyLgPmcRhGuGcolxMm1CUYrCJG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FHlxgw6iDmGNPz4uQMQ5XvJEKP+FuzN4iL2YR/1Ug2TyltjeCPBiA3VMNa3NK8a9zXGwY5It64kURiQFt/QwQ9kH5xr298XH+hrpw==; 24:0xsrrBjfDxyQgPi7nwfs0rdW77FOejZ0iqWQpoTPkWslr1BWTFW7MgwESmZ8aLP/YrP6RVZ1zMPuxtsQSvHK+A==; 7:Kx/7oL6/bW42IqBXInTX5onTxRyZa5GtcUodDDYXgM4b4rJto0bE/sDNHFXkEj7vNvl5VqFbt9Pp9dTUmWBTZNpBEVAJyt5Jzi618LV0tUUVLdoNyDj3e8+UMN1ctrPY6zTEH8ylTKF9wRdODadKUKSawuDPcDUbVfc8qZwQitc/nNWyILxBSWF86B0jk3yNGBSGjpfMZvkjhsQTfQaDZHyvaQxpCgtZpHPBKkr/Eyk= SpamDiagnosticOutput: 1:22 X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 17:11:58.1772 (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: SN1PR0201MB1455 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. Signed-off-by: Raj Dinesh Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm8001_hwi.h | 2 +- drivers/scsi/pm8001/pm8001_sas.h | 95 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/pm8001/pm80xx_hwi.h | 2 +- 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_hwi.h b/drivers/scsi/pm8001/pm8001_hwi.h index e4867e690c84..f4331afe9b0b 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.h +++ b/drivers/scsi/pm8001/pm8001_hwi.h @@ -157,7 +157,7 @@ struct mpi_msg_hdr{ struct phy_start_req { __le32 tag; __le32 ase_sh_lm_slr_phyid; - struct sas_identify_frame sas_identify; + struct sas_identify_frame_local sas_identify; u32 reserved[5]; } __attribute__((packed, aligned(4))); diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h index e81a8fa7ef1a..2e17505ed5b8 100644 --- a/drivers/scsi/pm8001/pm8001_sas.h +++ b/drivers/scsi/pm8001/pm8001_sas.h @@ -118,6 +118,101 @@ extern const struct pm8001_dispatch pm8001_80xx_dispatch; struct pm8001_hba_info; struct pm8001_ccb_info; struct pm8001_device; +#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 /* define task management IU */ struct pm8001_tmf_task { u8 tmf; diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h index 7a443bad6163..1ee2ec210065 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.h +++ b/drivers/scsi/pm8001/pm80xx_hwi.h @@ -248,7 +248,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)));