From patchwork Tue Jul 18 13:37:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9848381 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 5907C602C8 for ; Tue, 18 Jul 2017 13:40:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 452AE2853A for ; Tue, 18 Jul 2017 13:40:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3983C2854A; Tue, 18 Jul 2017 13:40: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=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA1542853A for ; Tue, 18 Jul 2017 13:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k131E05tb0bC7dCVokbiStFgUvkNihraGkfAXZZqe3k=; b=LFaJ0nOwiFb74b ju8ongbTLjs4ac+e+upOlFlCAa8Bjdb1Uw6EyKpYSlU8dU/3yFnRZvOHJur1e+BvuYqskXRkCaPeD LxHgPyALYxYZLqmLBVaIl8QxD6pDyFxX5j741c+pSRZnCLoI+dfrNxGJRIEAQO259EEQ8CLt3YMHK cZnVzizTxS0SS9WxzODmJW8cuwxMbn8wgPQ9VAqtpWOEtIjUhNuAo73dpP4eSXTR1TG0CQ1gVp2k1 Is9QBjTmCfOehFAT5yM5/e10eUM5U8EF7mImW1P5s8x+6ltGiWs/xKY6+WCPeuhhcG4cmYQh3MauI OgnHaG7BULvI2AwnrC1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXSjO-0002d1-5r; Tue, 18 Jul 2017 13:40:06 +0000 Received: from mail-cys01nam02on0068.outbound.protection.outlook.com ([104.47.37.68] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXShh-0000uR-Qs for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2017 13:38:26 +0000 Received: from MWHPR03CA0042.namprd03.prod.outlook.com (10.174.173.159) by CY1PR0301MB2122.namprd03.prod.outlook.com (10.164.2.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Tue, 18 Jul 2017 13:37:59 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::195) by MWHPR03CA0042.outlook.office365.com (2603:10b6:301:3b::31) 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; Tue, 18 Jul 2017 13:37:59 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1240.9 via Frontend Transport; Tue, 18 Jul 2017 13:37:59 +0000 Received: from fsr-fed1964-102.ea.freescale.net (fsr-fed1964-102.ea.freescale.net [10.171.73.86]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v6IDbQkE028521; Tue, 18 Jul 2017 06:37:54 -0700 From: To: , Subject: [PATCH v2 6/8] staging: fsl-mc: don't use raw device io functions Date: Tue, 18 Jul 2017 16:37:21 +0300 Message-ID: <20170718133723.12709-7-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170718133723.12709-1-laurentiu.tudor@nxp.com> References: <20170718133723.12709-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131448586795300300; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(43544003)(199003)(189002)(9170700003)(48376002)(86362001)(7416002)(50226002)(105606002)(4326008)(2876002)(5660300001)(966005)(6666003)(36756003)(2950100002)(50986999)(498600001)(76176999)(1076002)(189998001)(5003940100001)(305945005)(33646002)(38730400002)(69596002)(104016004)(53936002)(81166006)(77096006)(356003)(54906002)(86152003)(6306002)(8936002)(47776003)(626005)(106466001)(2906002)(39060400002)(8656003)(8676002)(50466002)(85426001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB2122; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2FFO11FD042; 1:FjLG9bPoeMAmGafNt78yLc+TGoMqNiAoO4u6StrC8u?= =?us-ascii?Q?b8cqS99c+589hsCJ+iNh/1+WZnCI+Oq0e9f2uA6TME8rLFYL854PxkLNAJns?= =?us-ascii?Q?TStK+5p6qgsROR7+6zP5a7tHZqVFagLGINrMs6iP3ftucr53RnuRY04epteW?= =?us-ascii?Q?acZV6dp81twCZf1q5e2Qft9qYbZ0nZg1eRhrimun6CKguDS3uufr+hKqzVGP?= =?us-ascii?Q?mAr8MCMXAeMXELFEmsSlWA2hlk+4HXxZkk/De6JOiSE7z/YcGwfpmN7L7Ksu?= =?us-ascii?Q?2R5Mwvq0gGPDWvMnrzaKpCAu7tPJfz2e7A8bpqhhCZTR4Pxl3KVVDmtBF0c/?= =?us-ascii?Q?zQTJLPgA44fMuSUpva0O1GdiuQWDN4JKoeT578oEqvJqayE4EWBpQBHkdtLW?= =?us-ascii?Q?S4dFizDiBB94OCniyJ/Yd1nnfsfnmTKxD7uRmh6WeRtk8YVTvbiBjwDPoAIQ?= =?us-ascii?Q?hw3wS/pSgGNTWd5bJ6XEB8ASZWZZQWEcpQyCATrqWB2dXBUa451XT0oboGWb?= =?us-ascii?Q?0hR14og1yDJY8SThK0Cbm6DaJbBijJSJ0zLRwQ7ChLgJSJJORPCbfcxzMq0C?= =?us-ascii?Q?1ZlNFMb0clWGXvsoRWK29LLNwRDj7fho2P2873grx+Mx5J8M0TbUKTiVqOud?= =?us-ascii?Q?6ipvsYTCmigr2CDVYy4xNcHMNRDswSyJXfbXx9sRkkJQnpK3B+ezJgISl4wo?= =?us-ascii?Q?TXvzMiesEjVIv2FmPbqgtfUcrU+wwGQZtv59MuAVJshuxbfEx3JJ7lAutzlk?= =?us-ascii?Q?9Hk/kqZ+Yk2a6lrBCO2ssDRhMuvrt6hnDZQx8rF1RuoihQHkCYp5r+bZE0PQ?= =?us-ascii?Q?HBGqUV+v4WjmoIvTfw1SM4MDHBOACe6zu21pKoizhaJBzjaH5WgDMSJFYfRQ?= =?us-ascii?Q?QZzxxzY0th4h3rnizlU/M4alVPLyIbOSOB/yM0bcQcGupv7MZ/dNZeCshyqF?= =?us-ascii?Q?QdQyoBEHbqFlIyFXVbkniJlY4uAbGchWtU4XtvIdZ36Dx1tyS3u9XAjJAW/1?= =?us-ascii?Q?L5xVjKyp/BqWDlpVFoPg47275Xu/KrxRSfjDRk/UHqJ0TvqweBoXFNWoCfWd?= =?us-ascii?Q?5kWUs=3D?= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 968a2452-201d-4aca-35cc-08d4cde234a0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR0301MB2122; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB2122; 3:E24qLPZMOsXk3acOMorSr3GEMgYiIAepXMgJj3HmGXZur1rhs4in9iyUwHjTvGjNDMLXr4A8RAuYaUebRUkI8k9xlwYl+aLIYF2XKGWJbQCLSzHsELxDcqP2znAoeTRRMB8f9HJck6DvKHmmgJx3FhMFWeHsO0VYnZkZxbbPPDBSPy4JSA+w0PfnU3XH6r1Pxg6c9lXcDq9de9r6T52jx5v4vm/SQBaXGwmfGdGsjCUaLXu5jUErsY0jUGjJYriM/2D1B5Ux+HTI9yBcyfTpQIaGn/sli8R/K62CRMytjZe029DOOMABS+ND1ddaai7Yz7yW+UETuTkv4CpJDSctlgsW6ys8g8822zrGV143gE6AlpI1HT2hRKPICgIHBRHHoE7MESy1y3TNGOONMD8KtxyzXR7Uu1QMsWAKX+f36/jT+LqUBSjZsH9ee1ddl2wV3kp7Ht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-Report-Test: UriScan:(236129657087228)(185117386973197)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(2017060910075)(13016025)(5005006)(13018025)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123556025)(20161123561025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0301MB2122; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0301MB2122; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB2122; 4:xbpYp2T4tAyml35oVvsddWQq15qLukq+0md3q1yw?= =?us-ascii?Q?NEXtkKIWoTDeAy0K+SnUFv02MPSQx2DOCt/c8k96qgxGebXSk1AqmdSuphNl?= =?us-ascii?Q?fWLUbJxqgxUZ1lYtXYwpWglceXiZWEQEV3hEQs9+Fg0p/Mjh0REZVYci9X2D?= =?us-ascii?Q?7PIgZ3HZ26ly2O0dLCjM4E39hsrnrJ7jw+dZRtR4jB8AWjEVuSEh9aV2MeiR?= =?us-ascii?Q?XdEa9FHEgAQ+Q+cWrt5d4QONaL2AfSnia0NVJ9dxxUq3qk1/TNd56HcoKJs6?= =?us-ascii?Q?2O9mSTC9Sdm7gEBXHnmtuXIXmdR6vUduqcXkBDaBfFqlU0VskJqoal63giBI?= =?us-ascii?Q?T5RAFLRWMzEY3+PBPfHP0uU1LC36CRl1Cac9HTYOMPlkM/1ToTOzTnn9Gdyo?= =?us-ascii?Q?A/mcNtIzS6GAumaHoC7byciT66Rqe+Bu2MFm2vGXg7rxLqJnDDC2t0gP5mqI?= =?us-ascii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AqFF7cR?= =?us-ascii?Q?fo8jjQ=3D=3D?= X-Forefront-PRVS: 037291602B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB2122; 23:Sdihd+KmPg65KP3379wY5zf01wHfXN1CDcHxQi0?= =?us-ascii?Q?0cCLNniQqFomOKaOp8YxQVMkG1YJel0Q690mguA9XqtNzzvZ5vHR83oNdidj?= =?us-ascii?Q?rkTa/+maZsh0uxLgypFHmy/lvYmJnN+xAZlS5SCG5ze1DHqvlEPtR/hqLLi3?= =?us-ascii?Q?Oqdppxc+bYrX2SIc2AWRtBHDCCNyrG/6JNCnL9ofseoxWWbZ6lOfzZptIOK+?= =?us-ascii?Q?9BKkDK/TWXoN5iSZm7kglWLtdmvDcMW2/X9IiTuVP1U+1nf99wruJbUVYMUi?= =?us-ascii?Q?DPRSSos2xMHQ8tVVBwzXqCwWLCL4au5+t8Tq3NWa35BmjrO+bn69F66zLfXs?= =?us-ascii?Q?CwKLpYhM8L6J/hMCQHmyWZ7JJ6vuqVSZ1M2ZvJ55k5b/ourSGi2N7u6IADQ3?= =?us-ascii?Q?e088+OG5J+GY/DBE9O9ANrA71BJX9lWcTrggkRwosbpkutSDIDnuzM6ZJ4RH?= =?us-ascii?Q?eUW4xDYgCDcBzeUASA14KRxCWfpG7OdiErQrdK8KW9Mz9/YI8TCxKFej85Cs?= =?us-ascii?Q?SktHOm0ovHg4bSmP/5oQRWh8KnVlhKGYD7edRdlEnTPsX4UtzJB5NQpUQL7Y?= =?us-ascii?Q?tzpwHOYkLGOtq37bpuUwL4V5jwsT3iKMbCJIkPOh1NmAAlJB7J+h+BNLv6Py?= =?us-ascii?Q?UR8vkn8Z6xRKIUSHjugz2oH9Zlt+sZijvu1YXX90ko6sEjJBTbr0qjnrjNtS?= =?us-ascii?Q?f4FXeGsNT5SwAE2KHqFA566P9zYTMnCN0XlLV0pduweeO9u/JpCynrn+/JBg?= =?us-ascii?Q?baWmhzLec9MtTnXE6EQLcFt160i6yM4O19I7zLVryeaqPhfl0ZbdrqsVSMES?= =?us-ascii?Q?B19W0b85Lim73Ymku0AZVsVHktLL/uhwNL1kydDYN6t9mL0QCorsoH/3T+ru?= =?us-ascii?Q?US6vSN7kyqw0QW9ErNTytgzVxojsFBzPtb0IEcYT9uDPFSKJokuFvBEzKibq?= =?us-ascii?Q?Sd2ADGPB3eRNU5ScaOMeiU5PENWFryeM5KLc5ykwxQUvYegK+GJnJCDLuo8n?= =?us-ascii?Q?y4TKqnuJKC+PndeltoX6wauPNLN27cHxMz1JrP8DQvpDgBn6D4z/5qfu6S1q?= =?us-ascii?Q?fTSU91vXWAe7s75jFYSASViU+2QPKp7bRWid6pJsnsnO40Atfp7iltzoh6nj?= =?us-ascii?Q?GZssFDj5HZOwMeGFc4N102fDgUZXlSpWRtz3Zt8/SAe1ovBuUXxjm0hqBm9+?= =?us-ascii?Q?cTKagDjwXk74Hoj8x4tkDB4cYtcUeuddYbFkl9d6TJ3wy0yWld+aluqVHfLT?= =?us-ascii?Q?rtfzz+sFor2YHovJ6xugQWaaDRua6f4BiwIvEjJpTaAeKGfQCfQZkZNDwgrc?= =?us-ascii?Q?JoB0MlTUeW+Jo441KOVmW1pmpGg4InZSXGSENB8sQL+7XuWj9s9RFHZplnIY?= =?us-ascii?Q?pFU/X5UoaA9DKs/sDYFZ1k2s9NZ0=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB2122; 6:+XZex2+ekotL1cVi/nqQpU5I+IDkeyfpze+jB7vY?= =?us-ascii?Q?t+mZlfv6uaBUIvtWiHuUoKzsvh32k/tjBJdfPbRNyI3gDIpl4rSadA0XLZjw?= =?us-ascii?Q?8tBGRx+KTLB5E54jYU8FuoQdoY+4QIwY24qmPLpd03V+98+rKVSfLYHhyQPM?= =?us-ascii?Q?aAF4i2+GvqMdP1lJmxw6gFGdYpWCHuwI6k/QuwXiIgjsAPJt01NOdkdf6jmw?= =?us-ascii?Q?Fnh28QTPAl9Kh+uRl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0a1zzWDJSGJpPRchHBIIS7mRj5LEA4n7tyiy2ZiPU2DbWPbLS3nS3vehtQ/b2yYTciKXAseVFExfpfWhNv5YFcHitswEU8N6dQhv366xcEuftTHvMZbdpMSB0ApSlxmL6jI00w4uf9omrX5IsWalOyp9X3HMWdobR/ODW+FIf0uqwhp+Nhx8QIvqavGrnxQXWnt6MlZovvXMWSsD1amxJ9FbbkGQ6YHI9IRP7s3u4RH3vBU315ED7YNZtvyeKaK0W5XNhYn3NZ9CRLIGKg8IWojoNjg6eHXCvZhvgvZgltahJK2T7F3H5bb1ekKYd3gxg5+ZaZSevMurymWCCE77MxPxb+5nNfR5eHzC0UG09FcE3zr3Ty8CQDZOnULxJNU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2017 13:37:59.2960 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB2122 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170718_063822_993717_AD8F430D X-CRM114-Status: UNSURE ( 3.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, ruxandra.radulescu@nxp.com, arnd@arndb.de, marc.zyngier@arm.com, bharat.bhushan@nxp.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, catalin.horghidan@nxp.com, ioana.ciornei@nxp.com, leoyang.li@nxp.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor As raw device io functions are not portable and don't handle byte-order (triggering suspicion that endianness isn't handled well) switch to using the standard api. Since MC expects LE byte-order and the upper layers already take care of that, we need to trick the device io api by doing a LE -> CPU conversion just before calling it. This way, the CPU -> LE conversion done in the api puts the data back in the right byte-order. Obviously, for reads the extra step is mirrored: there's a CPU -> LE conversion following the API call. Signed-off-by: Laurentiu Tudor --- Notes: -v2 -new patch replacing https://lkml.org/lkml/2017/7/17/419 drivers/staging/fsl-mc/bus/mc-sys.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c index 195d9f3..8a6dc47 100644 --- a/drivers/staging/fsl-mc/bus/mc-sys.c +++ b/drivers/staging/fsl-mc/bus/mc-sys.c @@ -126,12 +126,15 @@ static inline void mc_write_command(struct mc_command __iomem *portal, /* copy command parameters into the portal */ for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) - __raw_writeq(cmd->params[i], &portal->params[i]); - /* ensure command params are committed before submitting it */ - wmb(); + /* + * Data is already in the expected LE byte-order. Do an + * extra LE -> CPU conversion so that the CPU -> LE done in + * the device io write api puts it back in the right order. + */ + writeq_relaxed(le64_to_cpu(cmd->params[i]), &portal->params[i]); /* submit the command by writing the header */ - __raw_writeq(cmd->header, &portal->header); + writeq(le64_to_cpu(cmd->header), &portal->header); } /** @@ -151,14 +154,20 @@ static inline enum mc_cmd_status mc_read_response(struct mc_command __iomem * enum mc_cmd_status status; /* Copy command response header from MC portal: */ - resp->header = __raw_readq(&portal->header); + resp->header = cpu_to_le64(readq_relaxed(&portal->header)); status = mc_cmd_hdr_read_status(resp); if (status != MC_CMD_STATUS_OK) return status; /* Copy command response data from MC portal: */ for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) - resp->params[i] = __raw_readq(&portal->params[i]); + /* + * Data is expected to be in LE byte-order. Do an + * extra CPU -> LE to revert the LE -> CPU done in + * the device io read api. + */ + resp->params[i] = + cpu_to_le64(readq_relaxed(&portal->params[i])); return status; }