From patchwork Fri Jun 3 18:40:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9153855 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 8DE4E6082E for ; Fri, 3 Jun 2016 18:40:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8259127BFA for ; Fri, 3 Jun 2016 18:40:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7682C28334; Fri, 3 Jun 2016 18:40:35 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 934D827BFA for ; Fri, 3 Jun 2016 18:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932299AbcFCSkd (ORCPT ); Fri, 3 Jun 2016 14:40:33 -0400 Received: from mail-bl2on0064.outbound.protection.outlook.com ([65.55.169.64]:57045 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932268AbcFCSkb (ORCPT ); Fri, 3 Jun 2016 14:40:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=unf75/34XFsaB/PwEM5gBhEV325SKqll0imkZSHudMY=; b=YAwLGeEjFvrYT9ki6785rzpNBot7wezQE7Es0dUk+6475vy9gijGDxHm82aAR5nLJoy+PFj7d3yvWWQ5w880qZiWezdOOijrrlDrTfeJ+QCWkWR0sLySTUulfTDMdUinx08DigOnEaz4gZrSRw3ieRWgCzHpaPq45TQh0cNfZmE= Received: from BY2PR02CA0114.namprd02.prod.outlook.com (10.163.44.168) by BY2PR0201MB1767.namprd02.prod.outlook.com (10.163.72.21) with Microsoft SMTP Server (TLS) id 15.1.511.8; Fri, 3 Jun 2016 18:40:28 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::103) by BY2PR02CA0114.outlook.office365.com (2a01:111:e400:5261::40) with Microsoft SMTP Server (TLS) id 15.1.506.9 via Frontend Transport; Fri, 3 Jun 2016 18:40:28 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Fri, 3 Jun 2016 18:40:28 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 7F.7D.03023.02EC1575; Fri, 3 Jun 2016 11:36:16 -0700 (PDT) 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.279.2; Fri, 3 Jun 2016 11:40:24 -0700 X-AuditID: ac160c69-6db3098000000bcf-37-5751ce2009b9 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 38.7C.02607.81FC1575; Fri, 3 Jun 2016 11:40:24 -0700 (PDT) Subject: [PATCH 2/2] IB/srp: Fix srp_map_sg_dma() To: Doug Ledford References: <4b4cc34a-eebb-8534-3d76-1cfb3fe961f5@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , Laurence Oberman , "Marciniszyn, Mike" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <25293485-8307-5361-c6fc-6bcadd832249@sandisk.com> Date: Fri, 3 Jun 2016 11:40:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <4b4cc34a-eebb-8534-3d76-1cfb3fe961f5@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRmVeSWpSXmKPExsWyRoxnka7CucBwg+4P5hYvz39gtVi5+iiT xbNDvSwW5z+8YrLY8L+R3WLd6/csDmwe5+9tZPFYvOclk8fumw1sHu/3XWXz+LxJLoA1issm JTUnsyy1SN8ugSujd3c/c0ELX8WmAxdZGhhfcXcxcnJICJhIXGu5wN7FyMUhJDCXSeLW242s EM52Ron5DU/ZYKq2LpnNBpFYyiixvvkoI0hCWMBQ4vC3+6wgtoiAmsSmV4vYQWwhATuJhT82 M4M0MAvcB5p0qwcswSZgJPHt/UwWEJsXqGjuzz1gcRYBFYlPfSuYQGxRgQiJT7+/sELUCEqc nPkErJ5TwF5ie0sz0BUcQEM1Jdbv0gcJMwvIS2x/O4cZ4tCjrBL7N0tB3KAucXLJfKYJjMKz kEyahdA9C0n3AkbmVYxiuZk5xbnpqQWGpnrFiXkpmcXZesn5uZsYIXGSuYPx7hPvQ4wCHIxK PLwrFgSEC7EmlhVX5h5ilOBgVhLhnbc9MFyINyWxsiq1KD++qDQntfgQozQHi5I4r9u9L2FC AumJJanZqakFqUUwWSYOTqkGxomfrqQlGOT+9XkRbpXdndu2j2PRDKnw3gl5zZJzt7wQfXQn rqLNuaZds6hk6mqGzbaFsRUtPFOPzX668uOLCMmdBza5RzjZ1v2rYf1+52BCpekqN48DP3Qd j6UEzDP8Oz9C7TAXS+ef5MXPYhmW7drRtFUgUvOE6fNNfolmhq/iT/q8zRLbosRSnJFoqMVc VJwIACFCU06PAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCJMWRmVeSWpSXmKPExsXCtZEjRVfifGC4wdJtehYvz39gtVi5+iiT xbNDvSwW5z+8YrLY8L+R3WLd6/csDmwe5+9tZPFYvOclk8fumw1sHu/3XWXz+LxJLoA1issm JTUnsyy1SN8ugSujd3c/c0ELX8WmAxdZGhhfcXcxcnJICJhIbF0ym62LkYtDSGAxo8T3N6uZ QRLCAoYSh7/dZwWxRQTUJDa9WsQOYgsJ2Eks/LGZGaSBWeA+o8Tu9ZfBEmwCRhLf3s9kAbF5 gYrm/twDFmcRUJH41LeCCcQWFYiQ+PT7CytEjaDEyZlPwOo5Bewltrc0s4HYzALqEn/mXWKG sOUltr+dwzyBkW8WkpZZSMpmISlbwMi8ilEsNzOnODc9s8DQUK84MS8lszhbLzk/dxMjOFw5 I3cwPp1ofoiRiYNTqoHRVF3AKGTKip+OPWfYX1cdteuMU5tfaH5O4hNvykKf1purjyjwbrmj 89tnhkeJX2Crqeon98Y9K+O2HcotvTZ9+Z1i/1Pb/7xUNHyl+vHUqcX/tly9ur5lQlSh7Awj ycKjmV2Xpy6YN605/feJHHe/Uu9CtYkzpNYotDUmV82ceXpecPGumZJKSizFGYmGWsxFxYkA X5g53QcCAAA= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(9170700003)(8936002)(54356999)(50986999)(76176999)(86362001)(23676002)(50466002)(36756003)(31696002)(11100500001)(4001350100001)(2270400002)(4326007)(230700001)(5008740100001)(586003)(110136002)(6806005)(189998001)(81166006)(8676002)(5003600100002)(19580395003)(106466001)(92566002)(15975445007)(19580405001)(77096005)(33646002)(2950100001)(2906002)(229853001)(31686004)(65956001)(47776003)(65806001)(53416004)(87936001)(83506001)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1767; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD045; 1:6ljpLUx9lii3DdK2U3m3e2zvTurd6VaQlo9kXX6Pj5orm3b3a+Sh+iWmjU/4hy/nRnBK5ek8wIP78vbY0nR20MHr/noKx9C/AyH5becRzMW8BfBUPMkoLVgBPSmsaBQ0+a3XK1AwzJwLVEQdVNce1CoPi0P9NX0mk2hPaCRl6WVuwkWszEvJwNdyJjgMKS+zrUE7zIhaUpgsRZa5p1cUjklIB5WXNeLMo7AGBNHvbXSGclRH6f7mFT/Pqx0WygdSRZFmgacA9dT45TELkKLjICm12VVJwU4lU5/wSZeTdzmuNbShxJzcEfSGzka+QIfyVPRX6u4ydK8jVIHZRk5t/YtNm5JfWryNXfFVBa9PldU+xLliHO6oSAV2aU1fMUKvHPQQycd8tjJTQG7EZOUvgY+FoVnJAzXMxCRR9VSz1OfCp5sbsVYGv/m0b6QCEVImu0AsPB/PwUwJv3Qo95CzDw== X-MS-Office365-Filtering-Correlation-Id: 534a770f-d3e3-405d-44cd-08d38bde890c X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1767; 2:Cj0DWQ+QbpPcdW9/8ftc34I1hT+pQKrsd+19WuvABtI6Y1/ndN+2hUTlayrLy0oJQ3OOBh37QZlquifiByAJNpgnLsrn1bALBz9w6xrpgNWJFULOsiw9ZW8EWghstV6hryfA+h0tEM/Znh1dCVVl5bA0gtswIYT4lZpg+Ny4OUpLUIi9qbLeGXNCUDxwwwyt; 3:iqJNllXx7aXMtW3oH+6QJFW7lv8lVVloc8doZ9/qotW29bE2mxv2O55avbIJGU7+SZvImee0M7+4CykRWf7DLrduI5cRBo/0qnYsBnQWD4JUu+ozKdOsWtA7eZK/qDXDl/EVHI5E1w/vQZUZNAJOOIQvZP4dH4IIGcThODlDZbqmOCB/KQi5UpMw/LaNnXDLiolbSCR2f4wekU9yyN7RIbeQW1vWBQumoK9dbNAyDq0av4Vn9wJ8b7uBsylybGVOD+S4xMZyCCOhI4MgYYOQRw== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR0201MB1767; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1767; 25:mgkqRkvxEq4bqLRklkoL1/p5G+OlH8STQgQPtfT16Xq1YKgau1uMkNW9Qe96cC5T7kQ7SuLkVQcTFwRPA/IqmcjLWKkP3KtMlhlTdC9yBSfX2Ep5o1a3SulxdvfUz2T/bY3SnfcFNTYMDFOBkbVB5KwNT+s3rHIKOmVIM9aN2GRER3otNLZDvL/x43Fu5inDkBgiMKoA/OgC5QCXuQWm8SR2RuVVbIXVGfBtwdCUg2sZl5xu43vEsehkQ8Y3G2SuVh57iLxntWhvdOeoQ29/sKNnTiFY1JCIfpjhBXnUq0912ss7fpCqbuA4VVhK5taOhuKdkweEXxTWvcyK2bnEyUGT/UHLEkX1YvzVAsriChhJlqqFFwocgZZvA4BDOKTMkzMGcWuKODny9E8U/nUNom637eIPZ4IupncDbZHuakrjqIZENcMut6dUzF7X/yFqvjezpDdoFbwYySEhcP8Yib+zAQc3Q/HejDB5C7PtzjoU4vCLxAzuQMLpFol+LY+P896GdQJSrepE6C98hY2QxdTpJ6/1QJjOES9htEVySddkAyeKH8Q7HcXc1MlFPTrAui0/lR4+08Ce/g6bBdruacOJyHyRnF6UZ5seqgB0E4qIeXb/S4I/49SmmF9FxMX12yvnANl5YaHqtG/0y4IOg+Icex+k/nViA7OuRMdrbz5Ff4dV5fnxO3DPUl81sw72YNdybEPDUidPymq393dgWfuMNO7R5HKsMm8m+FArop8BR5wJpiF/pbAfGaRyB5S2NHtmaDvz+/MRYlZ1RjSUtf8fteMJiWcV/T7ELLwnw6z8dNcRME7I0mpDiAoMQuTILj9sfb5CIX5ZxbWqE3koBw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1767; 20:ZxrftVBhmFJVTkIBdL6wjM5pl3NEdNQGIkeiiKQnQ6iFOKrrOZ7rx7K6vwjXBP6S1AxeeLQU2cZ28RI5P6dQZLUe2i4hd2tL8XfwbW1tx3RA2or5fbPPAg3jyKtmPAt6QZPynUCcJMc9EWw1DIPSeraFO1Z9QHZhPBW4LVVO7IMIjxkabXraZf9BA6Xldz6nHAirGByToeobfsMf11C8jmRhg0JCqhXyciTdDyngY2Dn3MI2qofWDPmOy8VJzvv7Ab0AFfMvEqorQQbQRmZs7S3HmFMZ6hIrvHxMIgTRmfRy5z3HsT5qu27nx+/k0hGSnHXxjazr0Xs8d2qGdRZnNVgdazZzUZ5ImQ/i5w4rB4ERGOMToBwxWpohXX/002V+QB6gAAXD7VgO7ss8eF+iNFaC8APmohIMIXyuTLEp0LAfWeFuyno1ZQBzPy5jT1g4lfGKRM4ydz/BW60VhiRlaGazJ9rwnt5nFLuRJ4Ozsmey+2Guhn2kNyY8MfXqS/gF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(10201501046)(3002001)(6055026); SRVR:BY2PR0201MB1767; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB1767; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1767; 4:n/sPYneUzfWEXma3WcKhgaLWPnqH3RzjlJ+uXQmADODfDKjHWUxRYD17CfZzRLywQ8rW/Ijtauza5xA72C5YCYBwMb+olMMZzOMmWGuyfYy5QNdvuQZkeJNMX6jmvTtgV47oh1EPz5rF86FgprMEmGVxdz7Hlh//sPYKlUvDM92YtdSCMcr3bv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com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2016 18:40:28.7187 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1767 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because patch "IB/srp: Move common code into the caller" was applied partially srp_map_sg_dma() doesn't work properly. Fix this by applying the remainder of that patch. See also http://thread.gmane.org/gmane.linux.drivers.rdma/35803/focus=35811. Fixes: 3849e44d1c4b ("IB/srp: Move common code into the caller") Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Laurence Oberman Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index bc24b8d..3322ed7 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1457,7 +1457,6 @@ static int srp_map_sg_fr(struct srp_map_state *state, struct srp_rdma_ch *ch, { unsigned int sg_offset = 0; - state->desc = req->indirect_desc; state->fr.next = req->fr_list; state->fr.end = req->fr_list + ch->target->mr_per_cmd; state->sg = scat; @@ -1489,7 +1488,6 @@ static int srp_map_sg_dma(struct srp_map_state *state, struct srp_rdma_ch *ch, struct scatterlist *sg; int i; - state->desc = req->indirect_desc; for_each_sg(scat, sg, count, i) { srp_map_desc(state, ib_sg_dma_address(dev->dev, sg), ib_sg_dma_len(dev->dev, sg), @@ -1655,6 +1653,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, target->indirect_size, DMA_TO_DEVICE); memset(&state, 0, sizeof(state)); + state.desc = req->indirect_desc; if (dev->use_fast_reg) ret = srp_map_sg_fr(&state, ch, req, scat, count); else if (dev->use_fmr)