From patchwork Tue Dec 1 18:18:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 7739601 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 92A2F9F30B for ; Tue, 1 Dec 2015 18:19:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A15DE204F6 for ; Tue, 1 Dec 2015 18:19:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A430020452 for ; Tue, 1 Dec 2015 18:19:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbbLASTD (ORCPT ); Tue, 1 Dec 2015 13:19:03 -0500 Received: from mail-bl2on0094.outbound.protection.outlook.com ([65.55.169.94]:20968 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751140AbbLASTB (ORCPT ); Tue, 1 Dec 2015 13:19:01 -0500 Received: from BY1PR0201CA0017.namprd02.prod.outlook.com (10.160.191.155) by CY1PR0201MB0825.namprd02.prod.outlook.com (10.160.141.26) with Microsoft SMTP Server (TLS) id 15.1.331.20; Tue, 1 Dec 2015 18:18:57 +0000 Received: from BL2FFO11OLC015.protection.gbl (2a01:111:f400:7c09::100) by BY1PR0201CA0017.outlook.office365.com (2a01:111:e400:4814::27) with Microsoft SMTP Server (TLS) id 15.1.337.19 via Frontend Transport; Tue, 1 Dec 2015 18:18:57 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BL2FFO11OLC015.mail.protection.outlook.com (10.173.160.81) with Microsoft SMTP Server id 15.1.331.11 via Frontend Transport; Tue, 1 Dec 2015 18:18:56 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id 34.7F.32178.884ED565; Tue, 1 Dec 2015 10:18:48 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.248.2; Tue, 1 Dec 2015 10:18:48 -0800 X-AuditID: ac160a69-f79f76d000007db2-77-565de4887729 Received: from [10.60.52.33] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id E7.86.15370.784ED565; Tue, 1 Dec 2015 10:18:47 -0800 (PST) Subject: [PATCH 4/6] IB/srp: Fix indirect data buffer rkey endianness To: Doug Ledford References: <565DE3EC.2070002@sandisk.com> CC: Sagi Grimberg , Christoph Hellwig , Sebastian Parschauer , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <565DE487.2010803@sandisk.com> Date: Tue, 1 Dec 2015 10:18:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <565DE3EC.2070002@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeLIzCtJLcpLzFFi42JZI8azSLfjSWyYwaY5HBYvz39gtTg9YRGT xbNDvSwWr48/ZbI4eZvfgdVj+oxNrB6bV2h5/Pnzmdnj/b6rbB6fN8kFsEZx2aSk5mSWpRbp 2yVwZdxp/8lScIu94uqG+2wNjGfZu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IDlvOyB2MTyea H2Jk4uCUamBUkXy7d9ucHR/mKpieXMZw5tPRpoUJe9KE7+X+vaG8I67YZ82MNa5XJ3KXvD7d tcisNYJDV77+VMrVsJYd9vJOTuu0Nt7evrvn3vXQt7uOZYUd3fy0JWby1Nlcj9su35b73f/z 2rVnARMMC2YUX5yq+XiJhvCaR4UzT+euibywOMZNxuGHwF2vGiWW4oxEQy3mouJEAIHfFeAL AgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC015; 1:+3Z0o73xbHbqVpWVziPWpihmKNHvKV5Ky6tJCPWqlFXsbrr3ymtVKdi7xa0YTlP0NTgo4Ih9SNIAKg9JNofypJ5vgIedPLKf3y8MUFAVWox7Mr+0mc191NfNN0byQJV86/4h6LHTHXFWNa+5gzvUv8R/ESL3U+08A8CDWYBUuuBGv4u+8SPckUPrhbQkmadIHmfiKjb61r9jYI64e/QWV3ykorLODzjbzUMMsTnltJSevKneNvhRFzdw6X4LUR2rAon5mhioSoHHHWTE10mGTwDzh6uKp80VA9vW7QmJ0mWCm3qR2zcpw4zcALUNNU2x3l9Ug8pZa1dOtgByN6xmUdRfYWMnXbcbOFiqqxbnhW2KZLGE0SCdG8Nt35mzI3hKx48j1O7gT1u/fhq/1ZY014sNYvcNKH4x6C8ch8P9n68= X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(11100500001)(106466001)(69596002)(92566002)(65956001)(80316001)(87936001)(229853001)(65806001)(64126003)(83506001)(23676002)(65816999)(87266999)(86362001)(47776003)(50466002)(2950100001)(19580395003)(50986999)(5001960100002)(19580405001)(5008740100001)(33656002)(1096002)(77096005)(81156007)(97736004)(1220700001)(54356999)(586003)(110136002)(230700001)(4001350100001)(76176999)(36756003)(59896002)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0825; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0825; 2:n5FlxolAywozj1Wu6BM8JPCYklbve3tzK3VQJeh7DaRNSuPFZYBE7YnC93QcKxN9tJzKTUZ6tMhq9DE2CethfCagLqf558F8q0wxq/b39XmPeYCuUN+cbNHqD0EstWxholYkwQ+n/oorvdtOU5wz8g==; 3:sH/hjJvf8Wia7Q1NO4t1gdmm5Sft1qqeCWbPVgxuXdGavd/1SC1Jbi4ZRK39rrseoMeIcbsMXRgvTAERUnTR+si18A/dfv3VorEp+7ZdPeTnep2lx5ybQAe4TC4IGe6komDp00yZo/rYRXUTeMm7dpW972S6BkiiOtPmk8YpFFVHsuTd5mJ2Cb3O1LSDFgLQpi9chRWocB7LbITpNpu4pHFXcJwGRV24TPVBxp78rEz13OCNvSGjdcHINOsaHJYm/NxuR3jFLODQ9GiSdX2lhw==; 25:5lEOoOb5b1QKnmTLclLvSJXiBdWzYIK6qZo7cEY15KMIjbyrZGs5p9ej+4kq1w2kI8SO38MdqMcgEyohTUiyjD3rw2P/zni/Y1kGvFEtvbtRpkPyeMNqNokann96KtDR6MbXhlqDXgEnVMSZsyUBMEiGZScyyLS2BWyvM1uOY64H/eh7yiGKpLjcpHpU4C80cE7mPRSJyp94SpWTX4KR7NeOkSBLXLPN2BPBkOXbLBYBo/uznCzPm6rsgasN4LjqFLTudcfeh1Djtgbh7eRjGQ== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:CY1PR0201MB0825; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0825; 20:0kmR5nfTrAsDiVGU2vU9I7J3QU5whdJZk3Psp9KZskCh70mfoQB2z7V+yu4GyvIawX1vN3N84+n5NV5ep0zz2dPOi8eNhF1iKSUBGmzZtRcHe67kQWmIEeMp/hcKWaX+y7eV0G0J9yebZFV50dRxPWxMPUqtXc7Im3jF8/xShbYx6Y1KbJAI47W4KeEBTv8w/XQcO47xh3q37NWEs3JYj5GLeQsIAJ7nrZoGLmR/A5M/YzXwdftsnPUsd17YOUT/mQExPYtFjBNcAZjoISDV/gATLhVu7JT1kkZ7ibHQCr7Ie5v6IGOYbOMfUqc6PDidqAk4gHt6yqNko0QBCwebF8T0NsPcCh757Q7RS4Sm1oEAHrrT/Ispjmtuq85+HjjvLyqY89XVlSlKQ5z+DH5unUSh3q+5sm6XQePB7fnmsONn1vy67mqADv4x8I5RvPVjyYNR8b1ES9EYhOBB0dpEs0f4pOSoAFP6lLMNZ9kpLrArCz2iKA7Ikmd+CY8GnUYL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:CY1PR0201MB0825; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0825; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0825; 4:oepei7gsuBAmZC9vRYpBbKBwN3Su/y5h+qq+eawZaLZSnJmWTsTG8pI+tXlATYX8Adf7aP5RG39hLCwQnLa2CQLJkztRj81EIgfDxkl7KH+I2ydKm5sNP2gIxU5e66ieqFmch7M3sHC3/d5PN6uqHirr33qot3Svbuq4ps8s/fS7JhbnbzOPxAMyK7ZjcmS1YUtf5m+CU69Cyp4dmNFfGjEClGjpBuoPKRARMYfg5TSKBWSbmyOGdeVP1eAQZxM9uTA5Orv/4ixsQCvjPzjeZK7sGoP3XNYDZ4HumpRwecd76DgQONsS17O6nJYZ45mxdCNwRVZ9hv28cGt6peZ/q97w8Tk/zQpAyDMdS6H4wUZ8cYULfLnSnfOISSE+J3dzIwHJShI5smjosi/TnpXyDhVbp0NB1lRWpbvPO1LsLXPH0EnuzCVZo31Zw00J3c+3vywJAdnAkeQhC2fOyYCbRQ== X-Forefront-PRVS: 07778E4001 X-Microsoft-Exchange-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CZ4LoXWVLZwKAJ0Are65Ymx54Q=; 20:X+9/4jqkdr8noejOH367yZOa7yIY6235OgAIX0OTl2ftM+rB5HGCS7YrsuhwUYV+BXA3PWWsKpVCbIGvIKSw1wlFm8TLDi4Wrqz03NhyzCiAZMAaxACM5NcIv6CoUh9vLFR0bjzbQVNIdczgLauGe/P9EDelxh9iH/H/FKUXJCOpl9F9GMhwkSNm+6tk85n+EzyaPodC+I+QH9FmdosDndKvbtB0xtjSMYpelyCLtEcsVwhOgKlB5P0Y+VRWEWnB SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2015 18:18:56.8346 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB0825 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Detected by sparse. Fixes: commit 330179f2fa93 ("IB/srp: Register the indirect data buffer descriptor") Signed-off-by: Bart Van Assche Cc: stable # v4.3+ Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Sebastian Parschauer Reviewed-by: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 72fac20..fac1423 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1662,7 +1662,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, return ret; req->nmdesc++; } else { - idb_rkey = target->global_mr->rkey; + idb_rkey = cpu_to_be32(target->global_mr->rkey); } indirect_hdr->table_desc.va = cpu_to_be64(req->indirect_dma_addr);